Skip to content

Commit 062353d

Browse files
authored
[NFC][LLVM] Minor namespace fixes in PassBuilder (#141288)
- No need to prefix `PointerType` with `llvm::`. - Avoid namespace block to define `PrintPipelinePasses`.
1 parent 58f78d8 commit 062353d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,10 @@ using namespace llvm;
386386
static const Regex DefaultAliasRegex(
387387
"^(default|thinlto-pre-link|thinlto|lto-pre-link|lto)<(O[0123sz])>$");
388388

389-
namespace llvm {
390-
cl::opt<bool> PrintPipelinePasses(
389+
cl::opt<bool> llvm::PrintPipelinePasses(
391390
"print-pipeline-passes",
392391
cl::desc("Print a '-passes' compatible string describing the pipeline "
393392
"(best-effort only)."));
394-
} // namespace llvm
395393

396394
AnalysisKey NoOpModuleAnalysis::Key;
397395
AnalysisKey NoOpCGSCCAnalysis::Key;
@@ -429,7 +427,7 @@ class TriggerVerifierErrorPass
429427
PreservedAnalyses run(Module &M, ModuleAnalysisManager &) {
430428
// Intentionally break the Module by creating an alias without setting the
431429
// aliasee.
432-
auto *PtrTy = llvm::PointerType::getUnqual(M.getContext());
430+
auto *PtrTy = PointerType::getUnqual(M.getContext());
433431
GlobalAlias::create(PtrTy, PtrTy->getAddressSpace(),
434432
GlobalValue::LinkageTypes::InternalLinkage,
435433
"__bad_alias", nullptr, &M);

0 commit comments

Comments
 (0)