summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineCodeEmitter.h
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-10-21 11:42:16 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-10-21 11:42:16 +0000
commitcef7527a85d026aeb17a4dacca73c70c0ab5da40 (patch)
tree0a85fcdb02a052b1f08c226af631021cab95fc2c /include/llvm/CodeGen/MachineCodeEmitter.h
parente06e91122fefcadd252ddd2f2591e181683fc2f1 (diff)
downloadllvm-cef7527a85d026aeb17a4dacca73c70c0ab5da40.tar.gz
llvm-cef7527a85d026aeb17a4dacca73c70c0ab5da40.tar.bz2
llvm-cef7527a85d026aeb17a4dacca73c70c0ab5da40.tar.xz
fix a tricky bug in the JIT global variable emitter, that was triggered when JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineCodeEmitter.h')
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index 86684d7b9e..4ef230c81b 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -207,7 +207,7 @@ public:
/// allocateSpace - Allocate a block of space in the current output buffer,
/// returning null (and setting conditions to indicate buffer overflow) on
/// failure. Alignment is the alignment in bytes of the buffer desired.
- void *allocateSpace(intptr_t Size, unsigned Alignment) {
+ virtual void *allocateSpace(intptr_t Size, unsigned Alignment) {
emitAlignment(Alignment);
void *Result = CurBufferPtr;