diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-02-24 21:08:09 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-02-24 21:08:09 +0000 |
commit | 067986e534121a0226b5580d026c7afaf5ee514d (patch) | |
tree | 3bc6c907ce31ca539b8dde3f1e7b3f2b552d7f4c /lib/CodeGen/CGObjCMac.cpp | |
parent | d6f7e9dccd0fa8a5a15d7478324c0ae229fc5e1e (diff) |
Set flag for -fobjc-gc in IMAGE_INFO variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index a9cb833c73..3dec1dd796 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -3428,7 +3428,11 @@ void CGObjCNonFragileABIMac::FinishNonFragileABIModule() { // 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); |