aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/Reader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-14 23:28:41 +0000
committerChris Lattner <sabre@nondot.org>2001-10-14 23:28:41 +0000
commitb847f51bc83972178f29fe3634f38d6bfdc43bfd (patch)
tree88d99c27387f910dec8e59ce24a25a8d8707c99a /lib/Bytecode/Reader/Reader.cpp
parent349d591161e3926da4f0c7c2808d70a31abaf583 (diff)
External methods shouldn't have argument lists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/Reader.cpp')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index f93e73d42f..5cb20790b9 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -349,6 +349,10 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf,
// We don't need the placeholder anymore!
delete MethPHolder;
+ // If the method is empty, we don't need the method argument entries...
+ if (M->isExternal())
+ M->getArgumentList().delete_all();
+
DeclareNewGlobalValue(M, MethSlot);
return false;