|
@@ -440,8 +440,8 @@ void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD,
|
|
SourceLocation StartLoc) {
|
|
SourceLocation StartLoc) {
|
|
FunctionArgList args;
|
|
FunctionArgList args;
|
|
// Check if we should generate debug info for this method.
|
|
// Check if we should generate debug info for this method.
|
|
- if (CGM.getModuleDebugInfo() && !OMD->hasAttr<NoDebugAttr>())
|
|
|
|
- DebugInfo = CGM.getModuleDebugInfo();
|
|
|
|
|
|
+ if (!OMD->hasAttr<NoDebugAttr>())
|
|
|
|
+ maybeInitializeDebugInfo();
|
|
|
|
|
|
llvm::Function *Fn = CGM.getObjCRuntime().GenerateMethod(OMD, CD);
|
|
llvm::Function *Fn = CGM.getObjCRuntime().GenerateMethod(OMD, CD);
|
|
|
|
|
|
@@ -2830,9 +2830,8 @@ CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(
|
|
"__assign_helper_atomic_property_",
|
|
"__assign_helper_atomic_property_",
|
|
&CGM.getModule());
|
|
&CGM.getModule());
|
|
|
|
|
|
- if (CGM.getModuleDebugInfo())
|
|
|
|
- DebugInfo = CGM.getModuleDebugInfo();
|
|
|
|
-
|
|
|
|
|
|
+ // Initialize debug info if needed.
|
|
|
|
+ maybeInitializeDebugInfo();
|
|
|
|
|
|
StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
|
|
StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
|
|
|
|
|
|
@@ -2916,9 +2915,8 @@ CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(
|
|
llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage,
|
|
llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage,
|
|
"__copy_helper_atomic_property_", &CGM.getModule());
|
|
"__copy_helper_atomic_property_", &CGM.getModule());
|
|
|
|
|
|
- if (CGM.getModuleDebugInfo())
|
|
|
|
- DebugInfo = CGM.getModuleDebugInfo();
|
|
|
|
-
|
|
|
|
|
|
+ // Initialize debug info if needed.
|
|
|
|
+ maybeInitializeDebugInfo();
|
|
|
|
|
|
StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
|
|
StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation());
|
|
|
|
|