summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCWinCOFFStreamer.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-07-08 21:05:20 +0000
committerReid Kleckner <rnk@google.com>2019-07-08 21:05:20 +0000
commit2f07c2e9d9cc66c5c560a28ae7a706756efce2c4 (patch)
tree1d293dda4407e93472d1a3fcd0b1f32c7a6dcf7a /llvm/lib/MC/MCWinCOFFStreamer.cpp
parentf0d3dcec97a1e335452071440a73081908da712f (diff)
downloadbcm5719-llvm-2f07c2e9d9cc66c5c560a28ae7a706756efce2c4.tar.gz
bcm5719-llvm-2f07c2e9d9cc66c5c560a28ae7a706756efce2c4.zip
Standardize on MSVC behavior for triples with no environment
Summary: This makes it so that IR files using triples without an environment work out of the box, without normalizing them. Typically, the MSVC behavior is more desirable. For example, it tends to enable things like constant merging, use of associative comdats, etc. Addresses PR42491 Reviewers: compnerd Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64109 llvm-svn: 365387
Diffstat (limited to 'llvm/lib/MC/MCWinCOFFStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCWinCOFFStreamer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCWinCOFFStreamer.cpp b/llvm/lib/MC/MCWinCOFFStreamer.cpp
index 08f513f13cf..04d5f100a2f 100644
--- a/llvm/lib/MC/MCWinCOFFStreamer.cpp
+++ b/llvm/lib/MC/MCWinCOFFStreamer.cpp
@@ -255,7 +255,7 @@ void MCWinCOFFStreamer::EmitCommonSymbol(MCSymbol *S, uint64_t Size,
auto *Symbol = cast<MCSymbolCOFF>(S);
const Triple &T = getContext().getObjectFileInfo()->getTargetTriple();
- if (T.isKnownWindowsMSVCEnvironment()) {
+ if (T.isWindowsMSVCEnvironment()) {
if (ByteAlignment > 32)
report_fatal_error("alignment is limited to 32-bytes");
@@ -267,7 +267,7 @@ void MCWinCOFFStreamer::EmitCommonSymbol(MCSymbol *S, uint64_t Size,
Symbol->setExternal(true);
Symbol->setCommon(Size, ByteAlignment);
- if (!T.isKnownWindowsMSVCEnvironment() && ByteAlignment > 1) {
+ if (!T.isWindowsMSVCEnvironment() && ByteAlignment > 1) {
SmallString<128> Directive;
raw_svector_ostream OS(Directive);
const MCObjectFileInfo *MFI = getContext().getObjectFileInfo();
OpenPOWER on IntegriCloud