aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorZaara Syeda <95926691+syzaara@users.noreply.github.com>2024-03-13 10:26:31 -0400
committerGitHub <noreply@github.com>2024-03-13 10:26:31 -0400
commit37b5eb0a0a75bdf69b96b902417906da31c88dc3 (patch)
tree06a49de6a80e4b83201115ec2a4b0280eddd9fe6 /clang/lib/Frontend/CompilerInstance.cpp
parente77324decf74e8203fdee53e53c1866319ebf47c (diff)
downloadllvm-37b5eb0a0a75bdf69b96b902417906da31c88dc3.zip
llvm-37b5eb0a0a75bdf69b96b902417906da31c88dc3.tar.gz
llvm-37b5eb0a0a75bdf69b96b902417906da31c88dc3.tar.bz2
[AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (#67999)
This patch enables support that the XL compiler had for AIX under -qdatalocal/-qdataimported.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index ec4e682..019f847 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1047,6 +1047,11 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
if (getFrontendOpts().ShowStats || !getFrontendOpts().StatsFile.empty())
llvm::EnableStatistics(false);
+ // Sort vectors containing toc data and no toc data variables to facilitate
+ // binary search later.
+ llvm::sort(getCodeGenOpts().TocDataVarsUserSpecified);
+ llvm::sort(getCodeGenOpts().NoTocDataVars);
+
for (const FrontendInputFile &FIF : getFrontendOpts().Inputs) {
// Reset the ID tables if we are reusing the SourceManager and parsing
// regular files.