Skip to content

Commit 495ef59

Browse files
committed
rebase
1 parent 1882f7d commit 495ef59

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/lib/MC/MCContext.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,11 @@ MCSymbol *MCContext::createBlockSymbol(const Twine &Name, bool AlwaysEmit) {
322322
if (AlwaysEmit)
323323
return getOrCreateSymbol(MAI->getPrivateLabelPrefix() + Name);
324324

325-
if (!UseNamesOnTempLabels)
326-
return createSymbolImpl(nullptr, /*IsTemporary=*/true);
327-
328-
SmallString<128> NameSV;
329-
raw_svector_ostream(NameSV) << MAI->getPrivateLabelPrefix() << Name;
330-
return createSymbol(NameSV, false, /*IsTemporary=*/true);
325+
bool IsTemporary = !SaveTempLabels;
326+
if (IsTemporary && !UseNamesOnTempLabels)
327+
return createSymbolImpl(nullptr, IsTemporary);
328+
return createRenamableSymbol(MAI->getPrivateLabelPrefix() << Name,
329+
/*AlwaysAddSuffix=*/false, IsTemporary);
331330
}
332331

333332
MCSymbol *MCContext::createLinkerPrivateTempSymbol() {

0 commit comments

Comments
 (0)