mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[AIX] follow-up of D124654.
Report an error when alias symbols are not emitted all.
This commit is contained in:
@@ -3357,6 +3357,11 @@ void AsmPrinter::emitGlobalConstant(const DataLayout &DL, const Constant *CV,
|
||||
// look like they are at the same location.
|
||||
OutStreamer->emitIntValue(0, 1);
|
||||
}
|
||||
if (!AliasList)
|
||||
return;
|
||||
for (const auto &AliasPair : *AliasList)
|
||||
report_fatal_error("Aliases with offset " + Twine(AliasPair.first) +
|
||||
" were not emitted.");
|
||||
}
|
||||
|
||||
void AsmPrinter::emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
|
||||
|
||||
8
llvm/test/CodeGen/PowerPC/aix-alias-alignment-3.ll
Normal file
8
llvm/test/CodeGen/PowerPC/aix-alias-alignment-3.ll
Normal file
@@ -0,0 +1,8 @@
|
||||
;; TODO: The alias offset doesn't refer to any sub-element.
|
||||
; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
|
||||
; RUN: -data-sections=false < %s 2>&1 | FileCheck --check-prefix=ERROR %s
|
||||
|
||||
; ERROR: Aliases with offset 1 were not emitted.
|
||||
|
||||
@ConstVector = global <2 x i64> <i64 1, i64 2>
|
||||
@var = alias i64, getelementptr inbounds (i8, ptr @ConstVector, i32 1)
|
||||
Reference in New Issue
Block a user