diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -536,8 +536,7 @@ // generate tracing for it: at link-time, the function will be gone and the // first argument to the __cyg_profile_* function will be unresolvable. const FunctionDecl *FDecl = dyn_cast(CurFuncDecl); - if (FDecl && - FDecl->isInlined() && + if (FDecl && FDecl->isInlined() && !FDecl->isInlineDefinitionExternallyVisible()) return false; @@ -563,10 +562,11 @@ typedef std::vector::const_iterator ExcludedPathIterator; const std::vector &ExcludedPaths = - CGM.getCodeGenOpts().InstrumentFunctionsExcludedPaths; + CGM.getCodeGenOpts().InstrumentFunctionsExcludedPaths; for (ExcludedPathIterator ExcludedPath = ExcludedPaths.begin(), - Sentinel = ExcludedPaths.end(); ExcludedPath != Sentinel; ++ExcludedPath) + Sentinel = ExcludedPaths.end(); + ExcludedPath != Sentinel; ++ExcludedPath) if (Path.find(*ExcludedPath) != std::string::npos) return false; } @@ -577,12 +577,12 @@ // is searched to see if any of them is a substring of our (current) function // name. const std::vector &ExcludedFunctions = - CGM.getCodeGenOpts().InstrumentFunctionsExcludedFunctions; + CGM.getCodeGenOpts().InstrumentFunctionsExcludedFunctions; std::string MangledName(CurFn->getName()); std::string DemangledName(llvm::demangle(MangledName)); for (ExcludedFunctionIterator ExcludedFunction = ExcludedFunctions.begin(), - Sentinel = ExcludedFunctions.end(); + Sentinel = ExcludedFunctions.end(); ExcludedFunction != Sentinel; ++ExcludedFunction) if (DemangledName.find(*ExcludedFunction) != std::string::npos) return false;