Fix ConstantExpr opcode to use C++ enum values.
Note: C++ opcode is different from C opcode values. Add ConstantExpr opcode name. Add test for these.
This commit is contained in:
parent
76c60adbca
commit
5d14461c84
5 changed files with 51 additions and 3 deletions
|
|
@ -126,6 +126,19 @@ const CodeGenOpt::Level OptLevelMap[] = {
|
|||
};
|
||||
} // end anony namespace
|
||||
|
||||
|
||||
|
||||
|
||||
const char *LLVMGetConstExprOpcodeName(LLVMValueRef inst)
|
||||
{
|
||||
return llvm::unwrap<llvm::ConstantExpr>(inst)->getOpcodeName();
|
||||
}
|
||||
|
||||
unsigned LLVMGetConstExprOpcode(LLVMValueRef inst)
|
||||
{
|
||||
return llvm::unwrap<llvm::ConstantExpr>(inst)->getOpcode();
|
||||
}
|
||||
|
||||
void LLVMLdSetAlignment(LLVMValueRef inst, unsigned align)
|
||||
{
|
||||
return llvm::unwrap<LoadInst>(inst)->setAlignment(align);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue