[llvm] r334988 - Add return statements to make it clear that all of these are mutually exclusive conditions.
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 18 15:21:13 PDT 2018
Author: echristo
Date: Mon Jun 18 15:21:13 2018
New Revision: 334988
URL: http://llvm.org/viewvc/llvm-project?rev=334988&view=rev
Log:
Add return statements to make it clear that all of these are mutually exclusive conditions.
else if would have worked just as well, but this keeps the original readability a bit more clear.
Modified:
llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=334988&r1=334987&r2=334988&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Mon Jun 18 15:21:13 2018
@@ -689,6 +689,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Mod
// linker can safely perform dead code stripping. Since LLVM never
// generates code that does this, it is always safe to set.
OutStreamer->EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
+ return;
}
if (TT.isKnownWindowsMSVCEnvironment() && MMI->usesVAFloatArgument()) {
@@ -696,15 +697,18 @@ void X86AsmPrinter::EmitEndOfAsmFile(Mod
(TT.getArch() == Triple::x86_64) ? "_fltused" : "__fltused";
MCSymbol *S = MMI->getContext().getOrCreateSymbol(SymbolName);
OutStreamer->EmitSymbolAttribute(S, MCSA_Global);
+ return;
}
if (TT.isOSBinFormatCOFF()) {
SM.serializeToStackMapSection();
+ return;
}
if (TT.isOSBinFormatELF()) {
SM.serializeToStackMapSection();
FM.serializeToFaultMapSection();
+ return;
}
}
More information about the llvm-commits
mailing list