Skip to content

Commit 870cc22

Browse files
committed
Remove check on CodeGenOpt::XRayInstrumentFunctions
When adding XRayPreparationPass. Because for some reason, both CodeGenOpt::XRayInstrumentFunctions and LangOpt::XRayInstrument are set to the wrong value in BackendUtil.
1 parent 95ee4bd commit 870cc22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
10631063
});
10641064
}
10651065

1066-
if (CodeGenOpts.XRayInstrumentFunctions &&
1067-
!CodeGenOpts.XRayDefaultOptions.empty()) {
1066+
if (!CodeGenOpts.XRayDefaultOptions.empty()) {
10681067
PB.registerOptimizerLastEPCallback(
10691068
[](ModulePassManager &MPM, OptimizationLevel Level,
10701069
ThinOrFullLTOPhase) { MPM.addPass(XRayPreparationPass()); });

0 commit comments

Comments
 (0)