And final pack of warnings silencing
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 20 Feb 2008 11:27:04 +0000 (11:27 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 20 Feb 2008 11:27:04 +0000 (11:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47372 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/LinkTimeOptimizer.h
lib/Linker/LinkModules.cpp
tools/llvm-db/Commands.cpp

index de33871d680c82b1b86ca1a01fe715fb48694895..de48aa7f2eaa01ebd7075aa495fc94efc76b8937 100644 (file)
@@ -19,6 +19,7 @@
 #include <vector>
 #include <set>
 #include <llvm/ADT/hash_map>
+#include <cstring>
 
 #define LLVM_LTO_VERSION 2
 
index a8995d6fb498b0c77afe6db45c4274fef9925375..1ae609d4ab806e7da2513190216ee4dee7107fb3 100644 (file)
@@ -951,16 +951,19 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
     } else {
       std::string DataLayout;
 
-      if (Dest->getEndianness() == Module::AnyEndianness)
+      if (Dest->getEndianness() == Module::AnyEndianness) {
         if (Src->getEndianness() == Module::BigEndian)
           DataLayout.append("E");
         else if (Src->getEndianness() == Module::LittleEndian)
           DataLayout.append("e");
-      if (Dest->getPointerSize() == Module::AnyPointerSize)
+      }
+
+      if (Dest->getPointerSize() == Module::AnyPointerSize) {
         if (Src->getPointerSize() == Module::Pointer64)
           DataLayout.append(DataLayout.length() == 0 ? "p:64:64" : "-p:64:64");
         else if (Src->getPointerSize() == Module::Pointer32)
           DataLayout.append(DataLayout.length() == 0 ? "p:32:32" : "-p:32:32");
+      }
       Dest->setDataLayout(DataLayout);
     }
   }
index ae6d97ac9cef5112aa2a42a27e4fb5fe393c6ba6..ffebdd5d58f4bedfb0d2d304ed7625c9b6694d8f 100644 (file)
@@ -21,6 +21,7 @@
 #include "llvm/Support/FileUtilities.h"
 #include "llvm/ADT/StringExtras.h"
 #include <iostream>
+#include <cstdlib>
 using namespace llvm;
 
 /// getCurrentLanguage - Return the current source language that the user is
@@ -448,11 +449,12 @@ void CLIDebugger::downCommand(std::string &Options) {
   unsigned CurFrame = RI.getCurrentFrameIdx();
 
   // Check to see if we can go up the specified number of frames.
-  if (CurFrame < Num)
+  if (CurFrame < Num) {
     if (Num == 1)
       throw "Bottom (i.e., innermost) frame selected; you cannot go down.";
     else
       throw "Cannot go down " + utostr(Num) + " frames!";
+  }
 
   RI.setCurrentFrameIdx(CurFrame-Num);
   printProgramLocation();