aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2020-10-20 15:01:39 -0700
committerKazu Hirata <kazu@google.com>2020-10-20 15:01:40 -0700
commit96f372c1e7402595edd2ae9f86b9bdfa22dc1045 (patch)
tree63e37588f6bfbaac6a7b2054b16b99be8ef447e2 /clang/lib/Basic/SourceManager.cpp
parent256492677d9591c97071ce1ee4b060a2680316c5 (diff)
downloadllvm-96f372c1e7402595edd2ae9f86b9bdfa22dc1045.zip
llvm-96f372c1e7402595edd2ae9f86b9bdfa22dc1045.tar.gz
llvm-96f372c1e7402595edd2ae9f86b9bdfa22dc1045.tar.bz2
[AsmWriter] Construct SlotTracker with the function
This patch teaches BasicBlock::print to construct an instance of SlotTracker with the containing function. Without this patch, we dump: *** IR Dump After LoopInstSimplifyPass *** ; Preheader: br label %1 ; Loop: <badref>: ; preds = %1, %0 br label %1 Note "<badref>" above. This happens because BasicBlock::print calls: SlotTracker SlotTable(this->getModule()); Note that this constructor does not add the contents of functions to the slot table. That is, basic blocks are left unnumbered. This patch fixes the problem by switching to: SlotTracker SlotTable(this->getParent()); which does add the contents of the Module and the function, this->getParent(), to the slot table. Differential Revision: https://reviews.llvm.org/D89567
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions