diff options
author | Roman Tereshin <rtereshin@apple.com> | 2020-08-10 23:29:39 -0700 |
---|---|---|
committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2021-04-19 15:51:30 -0700 |
commit | 76b0ea7f2d5c935bc7975d6b77db20f947e13f9a (patch) | |
tree | e436af4aa6c5e37b585b1d29ccf50143ef5f3ba0 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 2218f5998b5b274f4c50d1a5fa2728a87594377e (diff) | |
download | llvm-76b0ea7f2d5c935bc7975d6b77db20f947e13f9a.zip llvm-76b0ea7f2d5c935bc7975d6b77db20f947e13f9a.tar.gz llvm-76b0ea7f2d5c935bc7975d6b77db20f947e13f9a.tar.bz2 |
Reset NextFnNum in MachineModuleInfo::initialize
In an env that reuses compiler instances for multiple compilations, this
omission results in non-deterministic assembly output (names of the
auto-generated labels) if the order or full set of Modules compiled
varies.
Differential Revision: https://reviews.llvm.org/D100797
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index b436633..776b7f5 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -196,6 +196,7 @@ void MMIAddrLabelMapCallbackPtr::allUsesReplacedWith(Value *V2) { void MachineModuleInfo::initialize() { ObjFileMMI = nullptr; CurCallSite = 0; + NextFnNum = 0; UsesMSVCFloatingPoint = UsesMorestackAddr = false; HasSplitStack = HasNosplitStack = false; AddrLabelSymbols = nullptr; |