about summary refs log tree commit diff homepage
path: root/lib/Module/Passes.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-01 22:31:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-01 22:31:44 +0000
commite07c9626f5ffeeef8fcb7cc9106efd732c79113c (patch)
tree8e06a3640e08bb17fcbc95514e33c50c6024ce36 /lib/Module/Passes.h
parent3f22dfb755580dc8d608140f5b4274b0e7ba14cd (diff)
downloadklee-e07c9626f5ffeeef8fcb7cc9106efd732c79113c.tar.gz
Implement va_arg handling for x86_64.
 - Based on a patch by Vladimir Kuznetsov!

 - x86_64 has a complicated calling convention for va_args; instead of dealing
   with this, this patch uses a clever workaround by initializing the va_list
   structure so that the callee believes all arguments were passed in the stack
   save area.


git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Module/Passes.h')
-rw-r--r--lib/Module/Passes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Module/Passes.h b/lib/Module/Passes.h
index 23205f75..37a9ac8b 100644
--- a/lib/Module/Passes.h
+++ b/lib/Module/Passes.h
@@ -53,6 +53,7 @@ public:
   // variables (via intrinsic lowering).
 class IntrinsicCleanerPass : public llvm::ModulePass {
   static char ID;
+  const llvm::TargetData &TargetData;
   llvm::IntrinsicLowering *IL;
   bool LowerIntrinsics;
 
@@ -61,6 +62,7 @@ public:
   IntrinsicCleanerPass(const llvm::TargetData &TD,
                        bool LI=true)
     : llvm::ModulePass((intptr_t) &ID),
+      TargetData(TD),
       IL(new llvm::IntrinsicLowering(TD)),
       LowerIntrinsics(LI) {}
   ~IntrinsicCleanerPass() { delete IL; }