diff options
author | Fangrui Song <maskray@google.com> | 2018-07-30 19:41:25 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-07-30 19:41:25 +0000 |
commit | f78650a8deca216b858827ff430972c114a60a7a (patch) | |
tree | c3df557e78d5234be1773b87bdd9f5601c5d4bfa /llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp | |
parent | 9d83ce90434aaa00e1b71393b7060bfce793fd69 (diff) | |
download | bcm5719-llvm-f78650a8deca216b858827ff430972c114a60a7a.tar.gz bcm5719-llvm-f78650a8deca216b858827ff430972c114a60a7a.zip |
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}
llvm-svn: 338293
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp index abcdaeba8eb..3be4bec566a 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp @@ -153,7 +153,7 @@ void LLVMInitializeMCJITCompilerOptions(LLVMMCJITCompilerOptions *PassedOptions, LLVMMCJITCompilerOptions options; memset(&options, 0, sizeof(options)); // Most fields are zero by default. options.CodeModel = LLVMCodeModelJITDefault; - + memcpy(PassedOptions, &options, std::min(sizeof(options), SizeOfPassedOptions)); } @@ -171,14 +171,14 @@ LLVMBool LLVMCreateMCJITCompilerForModule( "LLVM library mismatch."); return 1; } - + // Defend against the user having an old version of the API by ensuring that // any fields they didn't see are cleared. We must defend against fields being // set to the bitwise equivalent of zero, and assume that this means "do the // default" as if that option hadn't been available. LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); memcpy(&options, PassedOptions, SizeOfPassedOptions); - + TargetOptions targetOptions; targetOptions.EnableFastISel = options.EnableFastISel; std::unique_ptr<Module> Mod(unwrap(M)); @@ -241,12 +241,12 @@ LLVMGenericValueRef LLVMRunFunction(LLVMExecutionEngineRef EE, LLVMValueRef F, unsigned NumArgs, LLVMGenericValueRef *Args) { unwrap(EE)->finalizeObject(); - + std::vector<GenericValue> ArgVec; ArgVec.reserve(NumArgs); for (unsigned I = 0; I != NumArgs; ++I) ArgVec.push_back(*unwrap(Args[I])); - + GenericValue *Result = new GenericValue(); *Result = unwrap(EE)->runFunction(unwrap<Function>(F), ArgVec); return wrap(Result); @@ -297,7 +297,7 @@ void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global, void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global) { unwrap(EE)->finalizeObject(); - + return unwrap(EE)->getPointerToGlobal(unwrap<GlobalValue>(Global)); } @@ -395,11 +395,11 @@ LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager( LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, LLVMMemoryManagerDestroyCallback Destroy) { - + if (!AllocateCodeSection || !AllocateDataSection || !FinalizeMemory || !Destroy) return nullptr; - + SimpleBindingMMFunctions functions; functions.AllocateCodeSection = AllocateCodeSection; functions.AllocateDataSection = AllocateDataSection; |