forked from OSchip/llvm-project
patch for two things.
make sure objc2's nonfragile abi is enacted for Leopard too. add -fobjc-gc-only flag to the image_info symbol. llvm-svn: 65413
This commit is contained in:
parent
260c49a712
commit
240f2b7851
|
@ -152,11 +152,12 @@ static void GetDarwinLanguageOptions(LangOptions &Opts,
|
|||
|
||||
// Blocks default to on for 10.6 (darwin10) and beyond.
|
||||
// As does nonfragile-abi for 64bit mode
|
||||
if (Maj > 9) {
|
||||
if (Maj > 9)
|
||||
Opts.Blocks = 1;
|
||||
|
||||
if (Maj >= 9)
|
||||
if (Opts.ObjC1 && !strncmp(Triple, "x86_64", 6))
|
||||
Opts.ObjCNonFragileABI = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3429,9 +3429,11 @@ void CGObjCNonFragileABIMac::FinishNonFragileABIModule() {
|
|||
std::vector<llvm::Constant*> Values(2);
|
||||
Values[0] = 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;
|
||||
// FIXME: Fix and continue?
|
||||
if (CGM.getLangOptions().getGCMode() != LangOptions::NonGC)
|
||||
flags |= eImageInfo_GarbageCollected;
|
||||
if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly)
|
||||
flags |= eImageInfo_GCOnly;
|
||||
Values[1] = llvm::ConstantInt::get(ObjCTypes.IntTy, flags);
|
||||
llvm::Constant* Init = llvm::ConstantArray::get(
|
||||
llvm::ArrayType::get(ObjCTypes.IntTy, 2),
|
||||
|
|
Loading…
Reference in New Issue