Skip to content

Commit f926941

Browse files
authored
[clang] Move Annotation2MetadataPass to BackendUtil.cpp
1 parent 2dd0433 commit f926941

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/CodeGen/BackendUtil.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
#include "llvm/TargetParser/SubtargetFeature.h"
6262
#include "llvm/TargetParser/Triple.h"
6363
#include "llvm/Transforms/HipStdPar/HipStdPar.h"
64+
#include "llvm/Transforms/IPO/Annotation2Metadata.h"
6465
#include "llvm/Transforms/IPO/EmbedBitcodePass.h"
6566
#include "llvm/Transforms/IPO/LowerTypeTests.h"
6667
#include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
@@ -1096,6 +1097,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
10961097
MPM.addPassToFront(BitcodeAutoGeneratorPrePass(
10971098
CodeGenOpts.AutoGenerateBitcode, "BitcodeAutoGeneratorPre"));
10981099

1100+
// Convert @llvm.global.annotations to !annotation metadata.
1101+
MPM.addPassToFront(Annotation2MetadataPass());
1102+
10991103
// MSVC macro rebuilding pass (this pass must be at the top)
11001104
MPM.addPassToFront(MSVCMacroRebuildingPass());
11011105
}

0 commit comments

Comments
 (0)