[llvm-commits] [llvm] r52488 - in /llvm/trunk: lib/Analysis/ValueTracking.cpp tools/llvm-stub/llvm-stub.c
Duncan Sands
baldrick at free.fr
Thu Jun 19 01:47:32 PDT 2008
Author: baldrick
Date: Thu Jun 19 03:47:31 2008
New Revision: 52488
URL: http://llvm.org/viewvc/llvm-project?rev=52488&view=rev
Log:
Fix some warnings reported by gcc-4.3. Hopefully
this still compiles on windows - I can't test!
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
llvm/trunk/tools/llvm-stub/llvm-stub.c
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=52488&r1=52487&r2=52488&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Thu Jun 19 03:47:31 2008
@@ -871,7 +871,7 @@
const unsigned *req_idx = idx_begin;
for (const unsigned *i = I->idx_begin(), *e = I->idx_end();
i != e; ++i, ++req_idx) {
- if (req_idx == idx_end)
+ if (req_idx == idx_end) {
if (InsertBefore)
// The requested index identifies a part of a nested aggregate. Handle
// this specially. For example,
@@ -887,6 +887,7 @@
else
// We can't handle this without inserting insertvalues
return 0;
+ }
// This insert value inserts something else than what we are looking for.
// See if the (aggregrate) value inserted into has the value we are
Modified: llvm/trunk/tools/llvm-stub/llvm-stub.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-stub/llvm-stub.c?rev=52488&r1=52487&r2=52488&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-stub/llvm-stub.c (original)
+++ llvm/trunk/tools/llvm-stub/llvm-stub.c Thu Jun 19 03:47:31 2008
@@ -38,7 +38,6 @@
int main(int argc, char** argv) {
const char *Interp = getenv("LLVMINTERP");
const char **Args;
- int len;
if (Interp == 0) Interp = "lli";
/* Set up the command line options to pass to the JIT. */
@@ -47,12 +46,14 @@
Args[0] = Interp;
#ifdef LLVM_ON_WIN32
- len = strlen(argv[0]);
- if (len < 4 || strcmp(argv[0] + len - 4, ".exe") != 0) {
- /* .exe suffix is stripped off of argv[0] if the executable was run on the
- * command line without one. Put it back on.
- */
- argv[0] = strcat(strcpy((char*)malloc(len + 5), argv[0]), ".exe");
+ {
+ int len = strlen(argv[0]);
+ if (len < 4 || strcmp(argv[0] + len - 4, ".exe") != 0) {
+ /* .exe suffix is stripped off of argv[0] if the executable was run on the
+ * command line without one. Put it back on.
+ */
+ argv[0] = strcat(strcpy((char*)malloc(len + 5), argv[0]), ".exe");
+ }
}
#endif
More information about the llvm-commits
mailing list