[llvm-commits] [gcc-plugin] r76567 - /gcc-plugin/trunk/i386/llvm-i386.cpp
Duncan Sands
baldrick at free.fr
Tue Jul 21 04:07:59 PDT 2009
Author: baldrick
Date: Tue Jul 21 06:07:46 2009
New Revision: 76567
URL: http://llvm.org/viewvc/llvm-project?rev=76567&view=rev
Log:
Rearrange headers to something that works with gcc
mainline (which is much more picky than gcc-4.2).
Get rid of the use of "%H" in error lines: use
error_at instead.
Modified:
gcc-plugin/trunk/i386/llvm-i386.cpp
Modified: gcc-plugin/trunk/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/i386/llvm-i386.cpp?rev=76567&r1=76566&r2=76567&view=diff
==============================================================================
--- gcc-plugin/trunk/i386/llvm-i386.cpp (original)
+++ gcc-plugin/trunk/i386/llvm-i386.cpp Tue Jul 21 06:07:46 2009
@@ -23,18 +23,30 @@
// This is a C++ source file that implements specific llvm IA-32 ABI.
//===----------------------------------------------------------------------===//
-#include "llvm-abi.h"
-#include "llvm-internal.h"
+// LLVM headers
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
-#include "llvm-i386-target.h"
+// GCC headers
+#undef VISIBILITY_HIDDEN
+#define IN_GCC
+
+#include "config.h"
extern "C" {
-#include "toplev.h"
+#include "system.h"
}
+#include "coretypes.h"
+#include "target.h"
+#include "toplev.h"
+#include "tree.h"
+
+// Plugin headers
+#include "llvm-abi.h"
+#include "llvm-internal.h"
+#include "llvm-target.h"
static LLVMContext &Context = getGlobalContext();
@@ -147,7 +159,7 @@
((EV & 0x03) >> 0), ((EV & 0x0c) >> 2),
((EV & 0x30) >> 4)+4, ((EV & 0xc0) >> 6)+4);
} else {
- error("%Hmask must be an immediate", &EXPR_LOCATION(exp));
+ error_at(EXPR_LOCATION(exp), "mask must be an immediate");
Result = Ops[0];
}
return true;
@@ -157,7 +169,7 @@
Result = BuildVectorShuffle(Ops[0], Ops[1],
((EV & 0x01) >> 0), ((EV & 0x02) >> 1)+2);
} else {
- error("%Hmask must be an immediate", &EXPR_LOCATION(exp));
+ error_at(EXPR_LOCATION(exp), "mask must be an immediate");
Result = Ops[0];
}
return true;
@@ -169,7 +181,7 @@
((EV & 0x03) >> 0), ((EV & 0x0c) >> 2),
((EV & 0x30) >> 4), ((EV & 0xc0) >> 6));
} else {
- error("%Hmask must be an immediate", &EXPR_LOCATION(exp));
+ error_at(EXPR_LOCATION(exp), "mask must be an immediate");
Result = Ops[0];
}
return true;
@@ -191,7 +203,7 @@
((EV & 0x30) >> 4), ((EV & 0xc0) >> 6),
4, 5, 6, 7);
} else {
- error("%Hmask must be an immediate", &EXPR_LOCATION(exp));
+ error_at(EXPR_LOCATION(exp), "mask must be an immediate");
Result = Ops[0];
}
More information about the llvm-commits
mailing list