mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-28 16:26:18 +00:00
WebAssembly: assert that there aren't any constant pools
WebAssembly will either use globals or immediates, since it's a virtual ISA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3abc9b6333
commit
c3a33b1b54
@ -23,6 +23,7 @@
|
||||
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/CodeGen/AsmPrinter.h"
|
||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DebugInfo.h"
|
||||
@ -67,6 +68,7 @@ private:
|
||||
// AsmPrinter Implementation.
|
||||
//===------------------------------------------------------------------===//
|
||||
|
||||
void EmitConstantPool() override;
|
||||
void EmitFunctionEntryLabel() override;
|
||||
void EmitFunctionBodyStart() override;
|
||||
void EmitFunctionBodyEnd() override;
|
||||
@ -108,6 +110,11 @@ static const char *toType(const Type *Ty) {
|
||||
return "<invalid>";
|
||||
}
|
||||
|
||||
void WebAssemblyAsmPrinter::EmitConstantPool() {
|
||||
assert(MF->getConstantPool()->getConstants().empty() &&
|
||||
"WebAssembly disables constant pools");
|
||||
}
|
||||
|
||||
void WebAssemblyAsmPrinter::EmitFunctionEntryLabel() {
|
||||
SmallString<128> Str;
|
||||
raw_svector_ostream OS(Str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user