Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CodeGenAction.cpp
Show First 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | void HandleInterestingDecl(DeclGroupRef D) override { | ||||
// Ignore interesting decls from the AST reader after IRGen is finished. | // Ignore interesting decls from the AST reader after IRGen is finished. | ||||
if (!IRGenFinished) | if (!IRGenFinished) | ||||
HandleTopLevelDecl(D); | HandleTopLevelDecl(D); | ||||
} | } | ||||
// Links each entry in LinkModules into our module. Returns true on error. | // Links each entry in LinkModules into our module. Returns true on error. | ||||
bool LinkInModules() { | bool LinkInModules() { | ||||
for (auto &LM : LinkModules) { | for (auto &LM : LinkModules) { | ||||
assert(LM.Module && "LinkModule does not actually have a module"); | |||||
if (LM.PropagateAttrs) | if (LM.PropagateAttrs) | ||||
for (Function &F : *LM.Module) { | for (Function &F : *LM.Module) { | ||||
// Skip intrinsics. Keep consistent with how intrinsics are created | // Skip intrinsics. Keep consistent with how intrinsics are created | ||||
// in LLVM IR. | // in LLVM IR. | ||||
if (F.isIntrinsic()) | if (F.isIntrinsic()) | ||||
continue; | continue; | ||||
Gen->CGM().addDefaultFunctionDefinitionAttributes(F); | Gen->CGM().addDefaultFunctionDefinitionAttributes(F); | ||||
} | } | ||||
Show All 12 Lines | bool LinkInModules() { | ||||
} else { | } else { | ||||
Err = Linker::linkModules(*getModule(), std::move(LM.Module), | Err = Linker::linkModules(*getModule(), std::move(LM.Module), | ||||
LM.LinkFlags); | LM.LinkFlags); | ||||
} | } | ||||
if (Err) | if (Err) | ||||
return true; | return true; | ||||
} | } | ||||
LinkModules.clear(); | |||||
return false; // success | return false; // success | ||||
} | } | ||||
void HandleTranslationUnit(ASTContext &C) override { | void HandleTranslationUnit(ASTContext &C) override { | ||||
{ | { | ||||
llvm::TimeTraceScope TimeScope("Frontend"); | llvm::TimeTraceScope TimeScope("Frontend"); | ||||
PrettyStackTraceString CrashInfo("Per-file LLVM IR generation"); | PrettyStackTraceString CrashInfo("Per-file LLVM IR generation"); | ||||
if (TimerIsEnabled) { | if (TimerIsEnabled) { | ||||
▲ Show 20 Lines • Show All 972 Lines • Show Last 20 Lines |