aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCGNU.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-06-13 23:01:12 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-06-13 23:01:12 +0000
commit1e692ace08959399794363e77499b73da5494af9 (patch)
treef3b2a525ece7b5a7ad2df5328e1d46db215aef4c /lib/CodeGen/CGObjCGNU.cpp
parented6c70f63067ec06757aa019750765b80e23b423 (diff)
Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor the volatile flag. Places which need some further attention are marked with FIXMEs. Patch by Cédric Venet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index 78e02e409a..e545fc12ee 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -222,6 +222,7 @@ llvm::Value *CGObjCGNU::GetSelector(llvm::IRBuilder &Builder,
if (SelTypes == 0) {
// If it's already cached, return it.
if (UntypedSelectors[CName->getStringValue()]) {
+ // FIXME: Volatility
return Builder.CreateLoad(UntypedSelectors[CName->getStringValue()]);
}
// If it isn't, cache it.
@@ -230,6 +231,7 @@ llvm::Value *CGObjCGNU::GetSelector(llvm::IRBuilder &Builder,
llvm::GlobalValue::InternalLinkage, ".objc_untyped_selector_alias",
NULL, &TheModule);
UntypedSelectors[CName->getStringValue()] = Sel;
+ // FIXME: Volatility
return Builder.CreateLoad(Sel);
}
// Typed selectors
@@ -238,6 +240,7 @@ llvm::Value *CGObjCGNU::GetSelector(llvm::IRBuilder &Builder,
CTypes->getStringValue());
// If it's already cached, return it.
if (TypedSelectors[Selector]) {
+ // FIXME: Volatility
return Builder.CreateLoad(TypedSelectors[Selector]);
}
// If it isn't, cache it.
@@ -246,6 +249,7 @@ llvm::Value *CGObjCGNU::GetSelector(llvm::IRBuilder &Builder,
llvm::GlobalValue::InternalLinkage, ".objc_typed_selector_alias",
NULL, &TheModule);
TypedSelectors[Selector] = Sel;
+ // FIXME: Volatility
return Builder.CreateLoad(Sel);
}
}
@@ -337,6 +341,7 @@ llvm::Value *CGObjCGNU::GenerateMessageSendSuper(llvm::IRBuilder &Builder,
llvm::StructType *ObjCSuperTy = llvm::StructType::get(Receiver->getType(),
IdTy, NULL);
llvm::Value *ObjCSuper = Builder.CreateAlloca(ObjCSuperTy);
+ // FIXME: volatility
Builder.CreateStore(Receiver, Builder.CreateStructGEP(ObjCSuper, 0));
Builder.CreateStore(ReceiverClass, Builder.CreateStructGEP(ObjCSuper, 1));