[cfe-commits] r65387 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Feb 24 13:08:10 PST 2009
Author: fjahanian
Date: Tue Feb 24 15:08:09 2009
New Revision: 65387
URL: http://llvm.org/viewvc/llvm-project?rev=65387&view=rev
Log:
Set flag for -fobjc-gc in IMAGE_INFO variable.
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=65387&r1=65386&r2=65387&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Tue Feb 24 15:08:09 2009
@@ -3428,7 +3428,11 @@
// FIXME. flags can be 0 | 1 | 2 | 6. For now just use 0
std::vector<llvm::Constant*> Values(2);
Values[0] = llvm::ConstantInt::get(ObjCTypes.IntTy, 0);
- Values[1] = llvm::ConstantInt::get(ObjCTypes.IntTy, 0);
+ unsigned int flags = 0;
+ // FIXME -fobjc-gc-only flags is 6.
+ if (CGM.getContext().getLangOptions().getGCMode() != LangOptions::NonGC)
+ flags |= 2;
+ Values[1] = llvm::ConstantInt::get(ObjCTypes.IntTy, flags);
llvm::Constant* Init = llvm::ConstantArray::get(
llvm::ArrayType::get(ObjCTypes.IntTy, 2),
Values);
More information about the cfe-commits
mailing list