OrenIshShalom
OrenIshShalom

Reputation: 7132

Extracting llvm::CallInst returned %tmp name

I have an llvm::CallInst *i, representing this call (taken from *.ll file):

%tmp3 = call i64 @__fdget(i32 %tmp) #5

How do I extract the returned value name (%tmp3 here)?

Thanks!

Upvotes: 0

Views: 118

Answers (1)

eush77
eush77

Reputation: 4088

llvm::Value::getName contains instruction name.

llvm::StringRef name = i->getName();

Upvotes: 1

Related Questions