summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJustin Holewinski <justin.holewinski@gmail.com>2011-09-29 14:25:48 +0000
committerJustin Holewinski <justin.holewinski@gmail.com>2011-09-29 14:25:48 +0000
commit2097d702d47d6ef51b6958f3f7a79e82b3278221 (patch)
tree2ffb7eae28201af66f9c70ea6fbbd0b1dd68e5ee /lib
parent92fb79b7a611ab4c1043f04e8acd08f963d073ad (diff)
downloadllvm-2097d702d47d6ef51b6958f3f7a79e82b3278221.tar.gz
llvm-2097d702d47d6ef51b6958f3f7a79e82b3278221.tar.bz2
llvm-2097d702d47d6ef51b6958f3f7a79e82b3278221.tar.xz
PTX: Fix broken shared library build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp2
-rw-r--r--lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h41
-rw-r--r--lib/Target/PTX/PTX.h18
-rw-r--r--lib/Target/PTX/PTXAsmPrinter.cpp4
4 files changed, 43 insertions, 22 deletions
diff --git a/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp b/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp
index 9c2b9a0449..ca943dee14 100644
--- a/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp
+++ b/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp
@@ -13,7 +13,7 @@
#define DEBUG_TYPE "asm-printer"
#include "PTXInstPrinter.h"
-#include "PTXMachineFunctionInfo.h"
+#include "MCTargetDesc/PTXBaseInfo.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
diff --git a/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h b/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h
new file mode 100644
index 0000000000..58da5b3846
--- /dev/null
+++ b/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h
@@ -0,0 +1,41 @@
+//===-- PTXBaseInfo.h - Top level definitions for PTX -------- --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains small standalone helper functions and enum definitions for
+// the PTX target useful for the compiler back-end and the MC libraries.
+// As such, it deliberately does not include references to LLVM core
+// code gen types, passes, etc..
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef PTXBASEINFO_H
+#define PTXBASEINFO_H
+
+#include "PTXMCTargetDesc.h"
+
+namespace llvm {
+ namespace PTX {
+ enum StateSpace {
+ GLOBAL = 0, // default to global state space
+ CONSTANT = 1,
+ LOCAL = 2,
+ PARAMETER = 3,
+ SHARED = 4
+ };
+
+ enum Predicate {
+ PRED_NORMAL = 0,
+ PRED_NEGATE = 1,
+ PRED_NONE = 2
+ };
+ } // namespace PTX
+} // namespace llvm
+
+#endif
+
diff --git a/lib/Target/PTX/PTX.h b/lib/Target/PTX/PTX.h
index cbcfa5144b..fd74c1e467 100644
--- a/lib/Target/PTX/PTX.h
+++ b/lib/Target/PTX/PTX.h
@@ -15,7 +15,7 @@
#ifndef PTX_H
#define PTX_H
-#include "MCTargetDesc/PTXMCTargetDesc.h"
+#include "MCTargetDesc/PTXBaseInfo.h"
#include "llvm/Target/TargetMachine.h"
namespace llvm {
@@ -25,22 +25,6 @@ namespace llvm {
class PTXTargetMachine;
class FunctionPass;
- namespace PTX {
- enum StateSpace {
- GLOBAL = 0, // default to global state space
- CONSTANT = 1,
- LOCAL = 2,
- PARAMETER = 3,
- SHARED = 4
- };
-
- enum Predicate {
- PRED_NORMAL = 0,
- PRED_NEGATE = 1,
- PRED_NONE = 2
- };
- } // namespace PTX
-
FunctionPass *createPTXISelDag(PTXTargetMachine &TM,
CodeGenOpt::Level OptLevel);
diff --git a/lib/Target/PTX/PTXAsmPrinter.cpp b/lib/Target/PTX/PTXAsmPrinter.cpp
index 75136a7ea3..371839eb1c 100644
--- a/lib/Target/PTX/PTXAsmPrinter.cpp
+++ b/lib/Target/PTX/PTXAsmPrinter.cpp
@@ -545,8 +545,6 @@ void PTXAsmPrinter::EmitFunctionEntryLabel() {
std::string decl = isKernel ? ".entry" : ".func";
- unsigned cnt = 0;
-
if (!isKernel) {
decl += " (";
if (ST.useParamSpaceForDeviceArgs()) {
@@ -583,8 +581,6 @@ void PTXAsmPrinter::EmitFunctionEntryLabel() {
decl += " (";
- cnt = 0;
-
// Print parameters
if (isKernel || ST.useParamSpaceForDeviceArgs()) {
for (PTXParamManager::param_iterator i = PM.arg_begin(), e = PM.arg_end(),