Add InlineAsm
This commit is contained in:
parent
6133b643d8
commit
507ff73061
4 changed files with 71 additions and 1 deletions
|
|
@ -74,6 +74,7 @@
|
|||
#include "llvm/Transforms/Utils/Cloning.h"
|
||||
#include "llvm/Linker.h"
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
#include <llvm/InlineAsm.h>
|
||||
|
||||
|
||||
// LLVM-C includes
|
||||
|
|
@ -135,6 +136,22 @@ const CodeGenOpt::Level OptLevelMap[] = {
|
|||
};
|
||||
} // end anony namespace
|
||||
|
||||
|
||||
LLVMValueRef LLVMGetFunctionFromInlineAsm(LLVMTypeRef funcType,
|
||||
const char inlineAsm[],
|
||||
const char constrains[],
|
||||
bool hasSideEffect,
|
||||
bool isAlignStack,
|
||||
int asmDialect)
|
||||
{
|
||||
using namespace llvm;
|
||||
FunctionType *fnty = unwrap<FunctionType>(funcType);
|
||||
// asmDialect does not exist for LLVM 3.1
|
||||
InlineAsm *inlineasmobj = InlineAsm::get(fnty, inlineAsm, constrains,
|
||||
hasSideEffect, isAlignStack);
|
||||
return wrap(inlineasmobj);
|
||||
}
|
||||
|
||||
LLVMModuleRef LLVMCloneModule(LLVMModuleRef mod)
|
||||
{
|
||||
using namespace llvm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue