summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/instructionssoa.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-04-21 00:10:39 -0400
committerZack Rusin <zack@tungstengraphics.com>2008-04-21 00:26:18 -0400
commit201ac414d4df00745e487a6ffbc9979a2e70f0c6 (patch)
tree3713e1c2c0389a0cf55ece047f55a2333b7036c0 /src/gallium/auxiliary/gallivm/instructionssoa.cpp
parent40e0439db448a7d93ddb18faac7f14b47b1343c0 (diff)
make llvm draw paths compile with the latest changes
switch the method of distribution of builtins (to get rid of the llvm2cpp dependency)
Diffstat (limited to 'src/gallium/auxiliary/gallivm/instructionssoa.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/instructionssoa.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructionssoa.cpp b/src/gallium/auxiliary/gallivm/instructionssoa.cpp
index 6f83b56a72..3c16a3692d 100644
--- a/src/gallium/auxiliary/gallivm/instructionssoa.cpp
+++ b/src/gallium/auxiliary/gallivm/instructionssoa.cpp
@@ -1,8 +1,35 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
#include "instructionssoa.h"
#include "storagesoa.h"
#include "pipe/p_shader_tokens.h"
+#include "pipe/p_util.h"
#include <llvm/CallingConv.h>
#include <llvm/Constants.h>
@@ -10,7 +37,10 @@
#include <llvm/Function.h>
#include <llvm/Instructions.h>
#include <llvm/Transforms/Utils/Cloning.h>
-#include <llvm/ParamAttrsList.h>
+#include <llvm/ParameterAttributes.h>
+#include <llvm/Support/MemoryBuffer.h>
+#include <llvm/Bitcode/ReaderWriter.h>
+
#include <iostream>
@@ -183,7 +213,10 @@ llvm::Module * InstructionsSoa::currentModule() const
void InstructionsSoa::createBuiltins()
{
- m_builtins = createSoaBuiltins();
+ MemoryBuffer *buffer = MemoryBuffer::getMemBuffer(
+ (const char*)&soabuiltins_data[0],
+ (const char*)&soabuiltins_data[Elements(soabuiltins_data)-1]);
+ m_builtins = ParseBitcodeFile(buffer);
createDependencies();
}