mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
add load/store volatility control to the C API, patch by Yiannis Tsiouris!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1fe6bfca59
commit
eabe3ad57d
@ -2398,6 +2398,8 @@ LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str,
|
||||
const char *Name);
|
||||
LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
|
||||
const char *Name);
|
||||
LLVMBool LLVMGetVolatile(LLVMValueRef MemoryAccessInst);
|
||||
void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile);
|
||||
|
||||
/* Casts */
|
||||
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val,
|
||||
|
@ -2066,6 +2066,20 @@ LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
|
||||
return wrap(unwrap(B)->CreateGlobalStringPtr(Str, Name));
|
||||
}
|
||||
|
||||
LLVMBool LLVMGetVolatile(LLVMValueRef MemAccessInst) {
|
||||
Value *P = unwrap<Value>(MemAccessInst);
|
||||
if (LoadInst *LI = dyn_cast<LoadInst>(P))
|
||||
return LI->isVolatile();
|
||||
return cast<StoreInst>(P)->isVolatile();
|
||||
}
|
||||
|
||||
void LLVMSetVolatile(LLVMValueRef MemAccessInst, LLVMBool isVolatile) {
|
||||
Value *P = unwrap<Value>(MemAccessInst);
|
||||
if (LoadInst *LI = dyn_cast<LoadInst>(P))
|
||||
return LI->setVolatile(isVolatile);
|
||||
return cast<StoreInst>(P)->setVolatile(isVolatile);
|
||||
}
|
||||
|
||||
/*--.. Casts ...............................................................--*/
|
||||
|
||||
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef B, LLVMValueRef Val,
|
||||
|
Loading…
x
Reference in New Issue
Block a user