<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Eugene,</div><div class=""><br class=""></div>I get the following error because of this commit:<div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">lib/Support/RWMutex.cpp:58:3: </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">use of undeclared identifier 'bzero'</b></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  bzero(rwlock, sizeof(pthread_rwlock_t));</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">  ^</b></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">1 error generated.</span></div><div><br class=""></div><div>Could you have a look?</div><div><br class=""></div><div>Thanks,</div><div>-Quentin</div><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 5, 2016, at 1:19 PM, Eugene Zelenko via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Author: eugenezelenko<br class="">Date: Tue Apr  5 15:19:49 2016<br class="">New Revision: 265454<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=265454&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=265454&view=rev</a><br class="">Log:<br class="">Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.<br class=""><br class="">Some Include What You Use suggestions were used too.<br class=""><br class="">Use anonymous namespaces in source files.<br class=""><br class="">Differential revision: <a href="http://reviews.llvm.org/D18778" class="">http://reviews.llvm.org/D18778</a><br class=""><br class="">Modified:<br class="">    llvm/trunk/lib/Support/APFloat.cpp<br class="">    llvm/trunk/lib/Support/CrashRecoveryContext.cpp<br class="">    llvm/trunk/lib/Support/Errno.cpp<br class="">    llvm/trunk/lib/Support/Host.cpp<br class="">    llvm/trunk/lib/Support/MathExtras.cpp<br class="">    llvm/trunk/lib/Support/Mutex.cpp<br class="">    llvm/trunk/lib/Support/RWMutex.cpp<br class="">    llvm/trunk/lib/Support/SHA1.cpp<br class="">    llvm/trunk/lib/Support/SearchForAddressOfSpecialSymbol.cpp<br class="">    llvm/trunk/lib/Support/Unix/Path.inc<br class="">    llvm/trunk/lib/Support/Unix/Process.inc<br class="">    llvm/trunk/lib/Support/Unix/Program.inc<br class="">    llvm/trunk/lib/Support/Unix/Signals.inc<br class="">    llvm/trunk/lib/Support/Unix/ThreadLocal.inc<br class="">    llvm/trunk/lib/Support/Unix/Unix.h<br class="">    llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp<br class="">    llvm/trunk/tools/llvm-c-test/echo.cpp<br class="">    llvm/trunk/tools/llvm-c-test/llvm-c-test.h<br class="">    llvm/trunk/tools/llvm-readobj/COFFDumper.cpp<br class="">    llvm/trunk/tools/sancov/<a href="http://sancov.cc" class="">sancov.cc</a><br class="">    llvm/trunk/tools/sanstats/sanstats.cpp<br class="">    llvm/trunk/unittests/ADT/SCCIteratorTest.cpp<br class="">    llvm/trunk/unittests/ADT/SmallStringTest.cpp<br class="">    llvm/trunk/unittests/ADT/SmallVectorTest.cpp<br class="">    llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp<br class="">    llvm/trunk/unittests/Support/CommandLineTest.cpp<br class="">    llvm/trunk/unittests/Support/ProgramTest.cpp<br class="">    llvm/trunk/unittests/Support/StreamingMemoryObjectTest.cpp<br class="">    llvm/trunk/unittests/Support/TimeValueTest.cpp<br class="">    llvm/trunk/unittests/Support/TimerTest.cpp<br class=""><br class="">Modified: llvm/trunk/lib/Support/APFloat.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/APFloat.cpp (original)<br class="">+++ llvm/trunk/lib/Support/APFloat.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -14,14 +14,19 @@<br class=""><br class=""> #include "llvm/ADT/APFloat.h"<br class=""> #include "llvm/ADT/APSInt.h"<br class="">+#include "llvm/ADT/ArrayRef.h"<br class=""> #include "llvm/ADT/FoldingSet.h"<br class=""> #include "llvm/ADT/Hashing.h"<br class="">+#include "llvm/ADT/SmallVector.h"<br class=""> #include "llvm/ADT/StringExtras.h"<br class=""> #include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/Support/ErrorHandling.h"<br class=""> #include "llvm/Support/MathExtras.h"<br class="">+#include <algorithm><br class="">+#include <cassert><br class="">+#include <cstdint><br class=""> #include <cstring><br class="">-#include <limits.h><br class="">+#include <limits><br class=""><br class=""> using namespace llvm;<br class=""><br class="">@@ -93,18 +98,21 @@ namespace llvm {<br class="">   const unsigned int maxPowerOfFiveExponent = maxExponent + maxPrecision - 1;<br class="">   const unsigned int maxPowerOfFiveParts = 2 + ((maxPowerOfFiveExponent * 815)<br class="">                                                 / (351 * integerPartWidth));<br class="">-}<br class="">+<br class="">+} // end namespace llvm<br class="">+<br class="">+namespace {<br class=""><br class=""> /* A bunch of private, handy routines.  */<br class=""><br class="">-static inline unsigned int<br class="">+inline unsigned int<br class=""> partCountForBits(unsigned int bits)<br class=""> {<br class="">   return ((bits) + integerPartWidth - 1) / integerPartWidth;<br class=""> }<br class=""><br class=""> /* Returns 0U-9U.  Return values >= 10U are not digits.  */<br class="">-static inline unsigned int<br class="">+inline unsigned int<br class=""> decDigitValue(unsigned int c)<br class=""> {<br class="">   return c - '0';<br class="">@@ -115,7 +123,7 @@ decDigitValue(unsigned int c)<br class=""><br class="">    If the exponent overflows, returns a large exponent with the<br class="">    appropriate sign.  */<br class="">-static int<br class="">+int<br class=""> readExponent(StringRef::iterator begin, StringRef::iterator end)<br class=""> {<br class="">   bool isNegative;<br class="">@@ -159,7 +167,7 @@ readExponent(StringRef::iterator begin,<br class=""><br class=""> /* This is ugly and needs cleaning up, but I don't immediately see<br class="">    how whilst remaining safe.  */<br class="">-static int<br class="">+int<br class=""> totalExponent(StringRef::iterator p, StringRef::iterator end,<br class="">               int exponentAdjustment)<br class=""> {<br class="">@@ -208,7 +216,7 @@ totalExponent(StringRef::iterator p, Str<br class="">   return exponent;<br class=""> }<br class=""><br class="">-static StringRef::iterator<br class="">+StringRef::iterator<br class=""> skipLeadingZeroesAndAnyDot(StringRef::iterator begin, StringRef::iterator end,<br class="">                            StringRef::iterator *dot)<br class=""> {<br class="">@@ -249,7 +257,7 @@ struct decimalInfo {<br class="">   int normalizedExponent;<br class=""> };<br class=""><br class="">-static void<br class="">+void<br class=""> interpretDecimal(StringRef::iterator begin, StringRef::iterator end,<br class="">                  decimalInfo *D)<br class=""> {<br class="">@@ -308,7 +316,7 @@ interpretDecimal(StringRef::iterator beg<br class=""> /* Return the trailing fraction of a hexadecimal number.<br class="">    DIGITVALUE is the first hex digit of the fraction, P points to<br class="">    the next digit.  */<br class="">-static lostFraction<br class="">+lostFraction<br class=""> trailingHexadecimalFraction(StringRef::iterator p, StringRef::iterator end,<br class="">                             unsigned int digitValue)<br class=""> {<br class="">@@ -339,7 +347,7 @@ trailingHexadecimalFraction(StringRef::i<br class=""><br class=""> /* Return the fraction lost were a bignum truncated losing the least<br class="">    significant BITS bits.  */<br class="">-static lostFraction<br class="">+lostFraction<br class=""> lostFractionThroughTruncation(const integerPart *parts,<br class="">                               unsigned int partCount,<br class="">                               unsigned int bits)<br class="">@@ -361,7 +369,7 @@ lostFractionThroughTruncation(const inte<br class=""> }<br class=""><br class=""> /* Shift DST right BITS bits noting lost fraction.  */<br class="">-static lostFraction<br class="">+lostFraction<br class=""> shiftRight(integerPart *dst, unsigned int parts, unsigned int bits)<br class=""> {<br class="">   lostFraction lost_fraction;<br class="">@@ -374,7 +382,7 @@ shiftRight(integerPart *dst, unsigned in<br class=""> }<br class=""><br class=""> /* Combine the effect of two lost fractions.  */<br class="">-static lostFraction<br class="">+lostFraction<br class=""> combineLostFractions(lostFraction moreSignificant,<br class="">                      lostFraction lessSignificant)<br class=""> {<br class="">@@ -395,7 +403,7 @@ combineLostFractions(lostFraction moreSi<br class=""><br class="">    See "How to Read Floating Point Numbers Accurately" by William D<br class="">    Clinger.  */<br class="">-static unsigned int<br class="">+unsigned int<br class=""> HUerrBound(bool inexactMultiply, unsigned int HUerr1, unsigned int HUerr2)<br class=""> {<br class="">   assert(HUerr1 < 2 || HUerr2 < 2 || (HUerr1 + HUerr2 < 8));<br class="">@@ -409,7 +417,7 @@ HUerrBound(bool inexactMultiply, unsigne<br class=""> /* The number of ulps from the boundary (zero, or half if ISNEAREST)<br class="">    when the least significant BITS are truncated.  BITS cannot be<br class="">    zero.  */<br class="">-static integerPart<br class="">+integerPart<br class=""> ulpsFromBoundary(const integerPart *parts, unsigned int bits, bool isNearest)<br class=""> {<br class="">   unsigned int count, partBits;<br class="">@@ -454,7 +462,7 @@ ulpsFromBoundary(const integerPart *part<br class=""><br class=""> /* Place pow(5, power) in DST, and return the number of parts used.<br class="">    DST must be at least one part larger than size of the answer.  */<br class="">-static unsigned int<br class="">+unsigned int<br class=""> powerOf5(integerPart *dst, unsigned int power)<br class=""> {<br class="">   static const integerPart firstEightPowers[] = { 1, 5, 25, 125, 625, 3125,<br class="">@@ -517,17 +525,17 @@ powerOf5(integerPart *dst, unsigned int<br class=""><br class=""> /* Zero at the end to avoid modular arithmetic when adding one; used<br class="">    when rounding up during hexadecimal output.  */<br class="">-static const char hexDigitsLower[] = "0123456789abcdef0";<br class="">-static const char hexDigitsUpper[] = "0123456789ABCDEF0";<br class="">-static const char infinityL[] = "infinity";<br class="">-static const char infinityU[] = "INFINITY";<br class="">-static const char NaNL[] = "nan";<br class="">-static const char NaNU[] = "NAN";<br class="">+const char hexDigitsLower[] = "0123456789abcdef0";<br class="">+const char hexDigitsUpper[] = "0123456789ABCDEF0";<br class="">+const char infinityL[] = "infinity";<br class="">+const char infinityU[] = "INFINITY";<br class="">+const char NaNL[] = "nan";<br class="">+const char NaNU[] = "NAN";<br class=""><br class=""> /* Write out an integerPart in hexadecimal, starting with the most<br class="">    significant nibble.  Write out exactly COUNT hexdigits, return<br class="">    COUNT.  */<br class="">-static unsigned int<br class="">+unsigned int<br class=""> partAsHex (char *dst, integerPart part, unsigned int count,<br class="">            const char *hexDigitChars)<br class=""> {<br class="">@@ -545,7 +553,7 @@ partAsHex (char *dst, integerPart part,<br class=""> }<br class=""><br class=""> /* Write out an unsigned decimal integer.  */<br class="">-static char *<br class="">+char *<br class=""> writeUnsignedDecimal (char *dst, unsigned int n)<br class=""> {<br class="">   char buff[40], *p;<br class="">@@ -563,7 +571,7 @@ writeUnsignedDecimal (char *dst, unsigne<br class=""> }<br class=""><br class=""> /* Write out a signed decimal integer.  */<br class="">-static char *<br class="">+char *<br class=""> writeSignedDecimal (char *dst, int value)<br class=""> {<br class="">   if (value < 0) {<br class="">@@ -575,6 +583,8 @@ writeSignedDecimal (char *dst, int value<br class="">   return dst;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> /* Constructors.  */<br class=""> void<br class=""> APFloat::initialize(const fltSemantics *ourSemantics)<br class="">@@ -852,11 +862,13 @@ APFloat::semanticsPrecision(const fltSem<br class=""> {<br class="">   return semantics.precision;<br class=""> }<br class="">+<br class=""> APFloat::ExponentType<br class=""> APFloat::semanticsMaxExponent(const fltSemantics &semantics)<br class=""> {<br class="">   return semantics.maxExponent;<br class=""> }<br class="">+<br class=""> APFloat::ExponentType<br class=""> APFloat::semanticsMinExponent(const fltSemantics &semantics)<br class=""> {<br class="">@@ -1907,7 +1919,6 @@ APFloat::opStatus APFloat::roundToIntegr<br class="">   return fs;<br class=""> }<br class=""><br class="">-<br class=""> /* Comparison requires normalized numbers.  */<br class=""> APFloat::cmpResult<br class=""> APFloat::compare(const APFloat &rhs) const<br class="">@@ -2558,14 +2569,16 @@ APFloat::convertFromDecimalString(String<br class=""><br class="">   /* Check whether the normalized exponent is high enough to overflow<br class="">      max during the log-rebasing in the max-exponent check below. */<br class="">-  } else if (D.normalizedExponent - 1 > INT_MAX / 42039) {<br class="">+  } else if (D.normalizedExponent - 1 ><br class="">+              std::numeric_limits<int>::max() / 42039) {<br class="">     fs = handleOverflow(rounding_mode);<br class=""><br class="">   /* If it wasn't, then it also wasn't high enough to overflow max<br class="">      during the log-rebasing in the min-exponent check.  Check that it<br class="">      won't overflow min in either check, then perform the min-exponent<br class="">      check. */<br class="">-  } else if (D.normalizedExponent - 1 < INT_MIN / 42039 ||<br class="">+  } else if ((D.normalizedExponent - 1 <<br class="">+               std::numeric_limits<int>::min() / 42039) ||<br class="">              (D.normalizedExponent + 1) * 28738 <=<br class="">                8651 * (semantics->minExponent - (int) semantics->precision)) {<br class="">     /* Underflow to zero and round.  */<br class="">@@ -3219,7 +3232,7 @@ APFloat::initFromQuadrupleAPInt(const AP<br class="">   uint64_t mysignificand2 = i2 & 0xffffffffffffLL;<br class=""><br class="">   initialize(&APFloat::IEEEquad);<br class="">-  assert(partCount()==2);<br class="">+  assert(partCount() == 2);<br class=""><br class="">   sign = static_cast<unsigned int>(i2>>63);<br class="">   if (myexponent==0 &&<br class="">@@ -3485,6 +3498,7 @@ APFloat::APFloat(double d) {<br class=""> }<br class=""><br class=""> namespace {<br class="">+<br class="">   void append(SmallVectorImpl<char> &Buffer, StringRef Str) {<br class="">     Buffer.append(Str.begin(), Str.end());<br class="">   }<br class="">@@ -3521,7 +3535,6 @@ namespace {<br class="">     significand = significand.trunc(significand.getActiveBits());<br class="">   }<br class=""><br class="">-<br class="">   void AdjustToPrecision(SmallVectorImpl<char> &buffer,<br class="">                          int &exp, unsigned FormatPrecision) {<br class="">     unsigned N = buffer.size();<br class="">@@ -3566,7 +3579,8 @@ namespace {<br class="">     exp += FirstSignificant;<br class="">     buffer.erase(&buffer[0], &buffer[FirstSignificant]);<br class="">   }<br class="">-}<br class="">+<br class="">+} // end anonymous namespace<br class=""><br class=""> void APFloat::toString(SmallVectorImpl<char> &Str,<br class="">                        unsigned FormatPrecision,<br class=""><br class="">Modified: llvm/trunk/lib/Support/CrashRecoveryContext.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CrashRecoveryContext.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CrashRecoveryContext.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/CrashRecoveryContext.cpp (original)<br class="">+++ llvm/trunk/lib/Support/CrashRecoveryContext.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -8,19 +8,23 @@<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class=""> #include "llvm/Support/CrashRecoveryContext.h"<br class="">+#include "llvm/ADT/STLExtras.h"<br class=""> #include "llvm/Config/config.h"<br class=""> #include "llvm/Support/ErrorHandling.h"<br class=""> #include "llvm/Support/ManagedStatic.h"<br class=""> #include "llvm/Support/Mutex.h"<br class=""> #include "llvm/Support/ThreadLocal.h"<br class="">-#include <setjmp.h><br class="">+#include "llvm/Support/Threading.h"<br class="">+#include <cassert><br class="">+#include <csetjmp><br class="">+<br class=""> using namespace llvm;<br class=""><br class=""> namespace {<br class=""><br class=""> struct CrashRecoveryContextImpl;<br class=""><br class="">-static ManagedStatic<<br class="">+ManagedStatic<<br class="">     sys::ThreadLocal<const CrashRecoveryContextImpl> > CurrentContext;<br class=""><br class=""> struct CrashRecoveryContextImpl {<br class="">@@ -42,6 +46,7 @@ public:<br class="">     Next = CurrentContext->get();<br class="">     CurrentContext->set(this);<br class="">   }<br class="">+<br class="">   ~CrashRecoveryContextImpl() {<br class="">     if (!SwitchedThread)<br class="">       CurrentContext->set(Next);<br class="">@@ -70,14 +75,14 @@ public:<br class="">   }<br class=""> };<br class=""><br class="">-}<br class="">+ManagedStatic<sys::Mutex> gCrashRecoveryContextMutex;<br class="">+bool gCrashRecoveryEnabled = false;<br class=""><br class="">-static ManagedStatic<sys::Mutex> gCrashRecoveryContextMutex;<br class="">-static bool gCrashRecoveryEnabled = false;<br class="">-<br class="">-static ManagedStatic<sys::ThreadLocal<const CrashRecoveryContext>><br class="">+ManagedStatic<sys::ThreadLocal<const CrashRecoveryContext>><br class="">        tlIsRecoveringFromCrash;<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup() {}<br class=""><br class=""> CrashRecoveryContext::~CrashRecoveryContext() {<br class="">@@ -162,7 +167,9 @@ CrashRecoveryContext::unregisterCleanup(<br class=""> // SetUnhandledExceptionFilter API, but there's a risk of that<br class=""> // being entirely overwritten (it's not a chain).<br class=""><br class="">-static LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)<br class="">+namespace {<br class="">+<br class="">+LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)<br class=""> {<br class="">   // Lookup the current thread local recovery object.<br class="">   const CrashRecoveryContextImpl *CRCI = CurrentContext->get();<br class="">@@ -190,7 +197,9 @@ static LONG CALLBACK ExceptionHandler(PE<br class=""> // CrashRecoveryContext at all.  So we make use of a thread-local<br class=""> // exception table.  The handles contained in here will either be<br class=""> // non-NULL, valid VEH handles, or NULL.<br class="">-static sys::ThreadLocal<const void> sCurrentExceptionHandle;<br class="">+sys::ThreadLocal<const void> sCurrentExceptionHandle;<br class="">+<br class="">+} // end anonymous namespace<br class=""><br class=""> void CrashRecoveryContext::Enable() {<br class="">   sys::ScopedLock L(*gCrashRecoveryContextMutex);<br class="">@@ -239,14 +248,15 @@ void CrashRecoveryContext::Disable() {<br class=""> // reliable fashion -- if we get a signal outside of a crash recovery context we<br class=""> // simply disable crash recovery and raise the signal again.<br class=""><br class="">-#include <signal.h><br class="">+#include <csignal><br class=""><br class="">-static const int Signals[] =<br class="">-    { SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP };<br class="">-static const unsigned NumSignals = array_lengthof(Signals);<br class="">-static struct sigaction PrevActions[NumSignals];<br class="">+namespace {<br class=""><br class="">-static void CrashRecoverySignalHandler(int Signal) {<br class="">+const int Signals[] = { SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP };<br class="">+const unsigned NumSignals = array_lengthof(Signals);<br class="">+struct sigaction PrevActions[NumSignals];<br class="">+<br class="">+void CrashRecoverySignalHandler(int Signal) {<br class="">   // Lookup the current thread local recovery object.<br class="">   const CrashRecoveryContextImpl *CRCI = CurrentContext->get();<br class=""><br class="">@@ -278,6 +288,8 @@ static void CrashRecoverySignalHandler(i<br class="">     const_cast<CrashRecoveryContextImpl*>(CRCI)->HandleCrash();<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void CrashRecoveryContext::Enable() {<br class="">   sys::ScopedLock L(*gCrashRecoveryContextMutex);<br class=""><br class="">@@ -334,14 +346,16 @@ void CrashRecoveryContext::HandleCrash()<br class="">   CRCI->HandleCrash();<br class=""> }<br class=""><br class="">+namespace {<br class="">+<br class=""> // FIXME: Portability.<br class="">-static void setThreadBackgroundPriority() {<br class="">+void setThreadBackgroundPriority() {<br class=""> #ifdef __APPLE__<br class="">   setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);<br class=""> #endif<br class=""> }<br class=""><br class="">-static bool hasThreadBackgroundPriority() {<br class="">+bool hasThreadBackgroundPriority() {<br class=""> #ifdef __APPLE__<br class="">   return getpriority(PRIO_DARWIN_THREAD, 0) == 1;<br class=""> #else<br class="">@@ -349,16 +363,14 @@ static bool hasThreadBackgroundPriority(<br class=""> #endif<br class=""> }<br class=""><br class="">-namespace {<br class=""> struct RunSafelyOnThreadInfo {<br class="">   function_ref<void()> Fn;<br class="">   CrashRecoveryContext *CRC;<br class="">   bool UseBackgroundPriority;<br class="">   bool Result;<br class=""> };<br class="">-}<br class=""><br class="">-static void RunSafelyOnThread_Dispatch(void *UserData) {<br class="">+void RunSafelyOnThread_Dispatch(void *UserData) {<br class="">   RunSafelyOnThreadInfo *Info =<br class="">     reinterpret_cast<RunSafelyOnThreadInfo*>(UserData);<br class=""><br class="">@@ -367,6 +379,9 @@ static void RunSafelyOnThread_Dispatch(v<br class=""><br class="">   Info->Result = Info->CRC->RunSafely(Info->Fn);<br class=""> }<br class="">+<br class="">+} // end anonymous namespace<br class="">+<br class=""> bool CrashRecoveryContext::RunSafelyOnThread(function_ref<void()> Fn,<br class="">                                              unsigned RequestedStackSize) {<br class="">   bool UseBackgroundPriority = hasThreadBackgroundPriority();<br class=""><br class="">Modified: llvm/trunk/lib/Support/Errno.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Errno.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Errno.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Errno.cpp (original)<br class="">+++ llvm/trunk/lib/Support/Errno.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -14,11 +14,9 @@<br class=""> #include "llvm/Support/Errno.h"<br class=""> #include "llvm/Config/config.h"     // Get autoconf configuration settings<br class=""> #include "llvm/Support/raw_ostream.h"<br class="">-#include <string.h><br class="">-<br class="">-#if HAVE_ERRNO_H<br class="">-#include <errno.h><br class="">-#endif<br class="">+#include <cerrno><br class="">+#include <cstring><br class="">+#include <string><br class=""><br class=""> //===----------------------------------------------------------------------===//<br class=""> //=== WARNING: Implementation here must contain only TRULY operating system<br class="">@@ -32,7 +30,7 @@ namespace sys {<br class=""> std::string StrError() {<br class="">   return StrError(errno);<br class=""> }<br class="">-#endif  // HAVE_ERRNO_H<br class="">+#endif // HAVE_ERRNO_H<br class=""><br class=""> std::string StrError(int errnum) {<br class="">   std::string str;<br class="">@@ -72,5 +70,5 @@ std::string StrError(int errnum) {<br class="">   return str;<br class=""> }<br class=""><br class="">-}  // namespace sys<br class="">-}  // namespace llvm<br class="">+} // namespace sys<br class="">+} // namespace llvm<br class=""><br class="">Modified: llvm/trunk/lib/Support/Host.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Host.cpp (original)<br class="">+++ llvm/trunk/lib/Support/Host.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -19,8 +19,8 @@<br class=""> #include "llvm/Config/config.h"<br class=""> #include "llvm/Support/Debug.h"<br class=""> #include "llvm/Support/FileSystem.h"<br class="">-#include "llvm/Support/raw_ostream.h"<br class="">-#include <string.h><br class="">+#include <cstring><br class="">+#include <string><br class=""><br class=""> // Include the platform-specific parts of this class.<br class=""> #ifdef LLVM_ON_UNIX<br class="">@@ -49,8 +49,10 @@<br class=""><br class=""> using namespace llvm;<br class=""><br class="">+namespace {<br class="">+<br class=""> #if defined(__linux__)<br class="">-static ssize_t LLVM_ATTRIBUTE_UNUSED readCpuInfo(void *Buf, size_t Size) {<br class="">+ssize_t LLVM_ATTRIBUTE_UNUSED readCpuInfo(void *Buf, size_t Size) {<br class="">   // Note: We cannot mmap /proc/cpuinfo here and then process the resulting<br class="">   // memory buffer because the 'file' has 0 size (it can be read from only<br class="">   // as a stream).<br class="">@@ -74,8 +76,8 @@ static ssize_t LLVM_ATTRIBUTE_UNUSED rea<br class=""><br class=""> /// GetX86CpuIDAndInfo - Execute the specified cpuid and return the 4 values in the<br class=""> /// specified arguments.  If we can't run cpuid on the host, return true.<br class="">-static bool GetX86CpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX,<br class="">-                               unsigned *rECX, unsigned *rEDX) {<br class="">+bool GetX86CpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX,<br class="">+                        unsigned *rECX, unsigned *rEDX) {<br class=""> #if defined(__GNUC__) || defined(__clang__)<br class="">   #if defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)<br class="">     // gcc doesn't know cpuid would clobber ebx/rbx. Preseve it manually.<br class="">@@ -120,9 +122,8 @@ static bool GetX86CpuIDAndInfo(unsigned<br class=""> /// GetX86CpuIDAndInfoEx - Execute the specified cpuid with subleaf and return the<br class=""> /// 4 values in the specified arguments.  If we can't run cpuid on the host,<br class=""> /// return true.<br class="">-static bool GetX86CpuIDAndInfoEx(unsigned value, unsigned subleaf,<br class="">-                                 unsigned *rEAX, unsigned *rEBX, unsigned *rECX,<br class="">-                                 unsigned *rEDX) {<br class="">+bool GetX86CpuIDAndInfoEx(unsigned value, unsigned subleaf, unsigned *rEAX,<br class="">+                          unsigned *rEBX, unsigned *rECX, unsigned *rEDX) {<br class=""> #if defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)<br class="">   #if defined(__GNUC__)<br class="">     // gcc doesn't know cpuid would clobber ebx/rbx. Preseve it manually.<br class="">@@ -182,7 +183,7 @@ static bool GetX86CpuIDAndInfoEx(unsigne<br class=""> #endif<br class=""> }<br class=""><br class="">-static bool GetX86XCR0(unsigned *rEAX, unsigned *rEDX) {<br class="">+bool GetX86XCR0(unsigned *rEAX, unsigned *rEDX) {<br class=""> #if defined(__GNUC__)<br class="">   // Check xgetbv; this uses a .byte sequence instead of the instruction<br class="">   // directly because older assemblers do not include support for xgetbv and<br class="">@@ -199,8 +200,7 @@ static bool GetX86XCR0(unsigned *rEAX, u<br class=""> #endif<br class=""> }<br class=""><br class="">-static void DetectX86FamilyModel(unsigned EAX, unsigned &Family,<br class="">-                                 unsigned &Model) {<br class="">+void DetectX86FamilyModel(unsigned EAX, unsigned &Family, unsigned &Model) {<br class="">   Family = (EAX >> 8) & 0xf; // Bits 8 - 11<br class="">   Model  = (EAX >> 4) & 0xf; // Bits 4 - 7<br class="">   if (Family == 6 || Family == 0xf) {<br class="">@@ -212,6 +212,8 @@ static void DetectX86FamilyModel(unsigne<br class="">   }<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> StringRef sys::getHostCPUName() {<br class="">   unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0;<br class="">   if (GetX86CpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX))<br class=""><br class="">Modified: llvm/trunk/lib/Support/MathExtras.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MathExtras.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MathExtras.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/MathExtras.cpp (original)<br class="">+++ llvm/trunk/lib/Support/MathExtras.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -1,4 +1,4 @@<br class="">-//===-- MathExtras.cpp - Implement the MathExtras header --------------===//<br class="">+//===-- MathExtras.cpp - Implement the MathExtras header ------------------===//<br class=""> //<br class=""> //                     The LLVM Compiler Infrastructure<br class=""> //<br class="">@@ -16,7 +16,7 @@<br class=""> #ifdef _MSC_VER<br class=""> #include <limits><br class=""> #else<br class="">-#include <math.h><br class="">+#include <cmath><br class=""> #endif<br class=""><br class=""> namespace llvm {<br class="">@@ -29,4 +29,4 @@ namespace llvm {<br class="">   const float huge_valf = HUGE_VALF;<br class=""> #endif<br class=""><br class="">-}<br class="">+} // end namespace llvm<br class=""><br class="">Modified: llvm/trunk/lib/Support/Mutex.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Mutex.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Mutex.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Mutex.cpp (original)<br class="">+++ llvm/trunk/lib/Support/Mutex.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -22,22 +22,26 @@<br class=""> #if !defined(LLVM_ENABLE_THREADS) || LLVM_ENABLE_THREADS == 0<br class=""> // Define all methods as no-ops if threading is explicitly disabled<br class=""> namespace llvm {<br class="">+<br class=""> using namespace sys;<br class="">+<br class=""> MutexImpl::MutexImpl( bool recursive) { }<br class=""> MutexImpl::~MutexImpl() { }<br class=""> bool MutexImpl::acquire() { return true; }<br class=""> bool MutexImpl::release() { return true; }<br class=""> bool MutexImpl::tryacquire() { return true; }<br class="">-}<br class="">+<br class="">+} // end namespace llvm<br class=""> #else<br class=""><br class=""> #if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_MUTEX_LOCK)<br class=""><br class=""> #include <cassert><br class="">+#include <cstdlib><br class=""> #include <pthread.h><br class="">-#include <stdlib.h><br class=""><br class=""> namespace llvm {<br class="">+<br class=""> using namespace sys;<br class=""><br class=""> // Construct a Mutex using pthread calls<br class="">@@ -110,7 +114,7 @@ MutexImpl::tryacquire()<br class="">   return errorcode == 0;<br class=""> }<br class=""><br class="">-}<br class="">+} // end namespace llvm<br class=""><br class=""> #elif defined(LLVM_ON_UNIX)<br class=""> #include "Unix/Mutex.inc"<br class=""><br class="">Modified: llvm/trunk/lib/Support/RWMutex.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/RWMutex.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/RWMutex.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/RWMutex.cpp (original)<br class="">+++ llvm/trunk/lib/Support/RWMutex.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -13,7 +13,6 @@<br class=""><br class=""> #include "llvm/Config/config.h"<br class=""> #include "llvm/Support/RWMutex.h"<br class="">-#include <cstring><br class=""><br class=""> //===----------------------------------------------------------------------===//<br class=""> //=== WARNING: Implementation here must contain only TRULY operating system<br class="">@@ -23,23 +22,27 @@<br class=""> #if !defined(LLVM_ENABLE_THREADS) || LLVM_ENABLE_THREADS == 0<br class=""> // Define all methods as no-ops if threading is explicitly disabled<br class=""> namespace llvm {<br class="">+<br class=""> using namespace sys;<br class="">+<br class=""> RWMutexImpl::RWMutexImpl() { }<br class=""> RWMutexImpl::~RWMutexImpl() { }<br class=""> bool RWMutexImpl::reader_acquire() { return true; }<br class=""> bool RWMutexImpl::reader_release() { return true; }<br class=""> bool RWMutexImpl::writer_acquire() { return true; }<br class=""> bool RWMutexImpl::writer_release() { return true; }<br class="">-}<br class="">+<br class="">+} // end namespace llvm<br class=""> #else<br class=""><br class=""> #if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_RWLOCK_INIT)<br class=""><br class=""> #include <cassert><br class="">+#include <cstdlib><br class=""> #include <pthread.h><br class="">-#include <stdlib.h><br class=""><br class=""> namespace llvm {<br class="">+<br class=""> using namespace sys;<br class=""><br class=""> // Construct a RWMutex using pthread calls<br class="">@@ -113,7 +116,7 @@ RWMutexImpl::writer_release()<br class="">   return errorcode == 0;<br class=""> }<br class=""><br class="">-}<br class="">+} // end namespace llvm<br class=""><br class=""> #elif defined(LLVM_ON_UNIX)<br class=""> #include "Unix/RWMutex.inc"<br class=""><br class="">Modified: llvm/trunk/lib/Support/SHA1.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SHA1.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SHA1.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/SHA1.cpp (original)<br class="">+++ llvm/trunk/lib/Support/SHA1.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -1,4 +1,4 @@<br class="">-//======- SHA1.h - Private copy of the SHA1 implementation ---*- C++ -* ======//<br class="">+//===--- SHA1.h - Private copy of the SHA1 implementation -------*- C++ -*-===//<br class=""> //<br class=""> //                     The LLVM Compiler Infrastructure<br class=""> //<br class="">@@ -13,12 +13,13 @@<br class=""> //<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class="">+#include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/Support/Host.h"<br class=""> #include "llvm/Support/SHA1.h"<br class="">-using namespace llvm;<br class=""><br class="">-#include <stdint.h><br class="">-#include <string.h><br class="">+#include <cstring><br class="">+<br class="">+using namespace llvm;<br class=""><br class=""> #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN<br class=""> #define SHA_BIG_ENDIAN<br class="">@@ -46,10 +47,14 @@ void SHA1::init() {<br class="">   InternalState.BufferOffset = 0;<br class=""> }<br class=""><br class="">-static uint32_t rol32(uint32_t number, uint8_t bits) {<br class="">+namespace {<br class="">+<br class="">+uint32_t rol32(uint32_t number, uint8_t bits) {<br class="">   return ((number << bits) | (number >> (32 - bits)));<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void SHA1::hashBlock() {<br class="">   uint8_t i;<br class="">   uint32_t a, b, c, d, e, t;<br class=""><br class="">Modified: llvm/trunk/lib/Support/SearchForAddressOfSpecialSymbol.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SearchForAddressOfSpecialSymbol.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SearchForAddressOfSpecialSymbol.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/SearchForAddressOfSpecialSymbol.cpp (original)<br class="">+++ llvm/trunk/lib/Support/SearchForAddressOfSpecialSymbol.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -14,10 +14,12 @@<br class=""> //<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class="">-#include <string.h><br class="">+#include <cstring><br class="">+<br class="">+namespace {<br class=""><br class=""> // Must declare the symbols in the global namespace.<br class="">-static void *DoSearch(const char* symbolName) {<br class="">+void *DoSearch(const char* symbolName) {<br class=""> #define EXPLICIT_SYMBOL(SYM) \<br class="">    extern void *SYM; if (!strcmp(symbolName, #SYM)) return &SYM<br class=""><br class="">@@ -51,8 +53,12 @@ static void *DoSearch(const char* symbol<br class="">   return nullptr;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> namespace llvm {<br class="">+<br class=""> void *SearchForAddressOfSpecialSymbol(const char* symbolName) {<br class="">   return DoSearch(symbolName);<br class=""> }<br class="">-}  // namespace llvm<br class="">+<br class="">+} // end namespace llvm<br class=""><br class="">Modified: llvm/trunk/lib/Support/Unix/Path.inc<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Unix/Path.inc (original)<br class="">+++ llvm/trunk/lib/Support/Unix/Path.inc Tue Apr  5 15:19:49 2016<br class="">@@ -17,8 +17,9 @@<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class=""> #include "Unix.h"<br class="">-#include <limits.h><br class="">-#include <stdio.h><br class="">+#include <cassert><br class="">+#include <climits><br class="">+#include <cstdio><br class=""> #if HAVE_SYS_STAT_H<br class=""> #include <sys/stat.h><br class=""> #endif<br class="">@@ -86,7 +87,10 @@ namespace fs {<br class=""> #if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \<br class="">     defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) || \<br class="">     defined(__linux__) || defined(__CYGWIN__) || defined(__DragonFly__)<br class="">-static int<br class="">+<br class="">+namespace {<br class="">+<br class="">+int<br class=""> test_dir(char ret[PATH_MAX], const char *dir, const char *bin)<br class=""> {<br class="">   struct stat sb;<br class="">@@ -101,7 +105,7 @@ test_dir(char ret[PATH_MAX], const char<br class="">   return 0;<br class=""> }<br class=""><br class="">-static char *<br class="">+char *<br class=""> getprogpath(char ret[PATH_MAX], const char *bin)<br class=""> {<br class="">   char *pv, *s, *t;<br class="">@@ -138,6 +142,9 @@ getprogpath(char ret[PATH_MAX], const ch<br class="">   free(pv);<br class="">   return nullptr;<br class=""> }<br class="">+<br class="">+} // end anonymous namespace<br class="">+<br class=""> #endif // __FreeBSD__ || __NetBSD__ || __FreeBSD_kernel__<br class=""><br class=""> /// GetMainExecutable - Return the path to the main executable, given the<br class="">@@ -330,7 +337,9 @@ std::error_code resize_file(int FD, uint<br class="">   return std::error_code();<br class=""> }<br class=""><br class="">-static int convertAccessMode(AccessMode Mode) {<br class="">+namespace {<br class="">+<br class="">+int convertAccessMode(AccessMode Mode) {<br class="">   switch (Mode) {<br class="">   case AccessMode::Exist:<br class="">     return F_OK;<br class="">@@ -342,6 +351,8 @@ static int convertAccessMode(AccessMode<br class="">   llvm_unreachable("invalid enum");<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> std::error_code access(const Twine &Path, AccessMode Mode) {<br class="">   SmallString<128> PathStorage;<br class="">   StringRef P = Path.toNullTerminatedStringRef(PathStorage);<br class="">@@ -381,8 +392,10 @@ std::error_code equivalent(const Twine &<br class="">   return std::error_code();<br class=""> }<br class=""><br class="">-static std::error_code fillStatus(int StatRet, const struct stat &Status,<br class="">-                             file_status &Result) {<br class="">+namespace {<br class="">+<br class="">+std::error_code fillStatus(int StatRet, const struct stat &Status,<br class="">+                           file_status &Result) {<br class="">   if (StatRet != 0) {<br class="">     std::error_code ec(errno, std::generic_category());<br class="">     if (ec == errc::no_such_file_or_directory)<br class="">@@ -416,6 +429,8 @@ static std::error_code fillStatus(int St<br class="">   return std::error_code();<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> std::error_code status(const Twine &Path, file_status &Result) {<br class="">   SmallString<128> PathStorage;<br class="">   StringRef P = Path.toNullTerminatedStringRef(PathStorage);<br class="">@@ -597,7 +612,9 @@ bool home_directory(SmallVectorImpl<char<br class="">   return false;<br class=""> }<br class=""><br class="">-static bool getDarwinConfDir(bool TempDir, SmallVectorImpl<char> &Result) {<br class="">+namespace {<br class="">+<br class="">+bool getDarwinConfDir(bool TempDir, SmallVectorImpl<char> &Result) {<br class="">   #if defined(_CS_DARWIN_USER_TEMP_DIR) && defined(_CS_DARWIN_USER_CACHE_DIR)<br class="">   // On Darwin, use DARWIN_USER_TEMP_DIR or DARWIN_USER_CACHE_DIR.<br class="">   // macros defined in <unistd.h> on darwin >= 9<br class="">@@ -622,7 +639,7 @@ static bool getDarwinConfDir(bool TempDi<br class="">   return false;<br class=""> }<br class=""><br class="">-static bool getUserCacheDir(SmallVectorImpl<char> &Result) {<br class="">+bool getUserCacheDir(SmallVectorImpl<char> &Result) {<br class="">   // First try using XDG_CACHE_HOME env variable,<br class="">   // as specified in XDG Base Directory Specification at<br class="">   // <a href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" class="">http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html</a><br class="">@@ -645,7 +662,7 @@ static bool getUserCacheDir(SmallVectorI<br class="">   return false;<br class=""> }<br class=""><br class="">-static const char *getEnvTempDir() {<br class="">+const char *getEnvTempDir() {<br class="">   // Check whether the temporary directory is specified by an environment<br class="">   // variable.<br class="">   const char *EnvironmentVariables[] = {"TMPDIR", "TMP", "TEMP", "TEMPDIR"};<br class="">@@ -657,7 +674,7 @@ static const char *getEnvTempDir() {<br class="">   return nullptr;<br class=""> }<br class=""><br class="">-static const char *getDefaultTempDir(bool ErasedOnReboot) {<br class="">+const char *getDefaultTempDir(bool ErasedOnReboot) {<br class=""> #ifdef P_tmpdir<br class="">   if ((bool)P_tmpdir)<br class="">     return P_tmpdir;<br class="">@@ -668,6 +685,8 @@ static const char *getDefaultTempDir(boo<br class="">   return "/var/tmp";<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void system_temp_directory(bool ErasedOnReboot, SmallVectorImpl<char> &Result) {<br class="">   Result.clear();<br class=""><br class=""><br class="">Modified: llvm/trunk/lib/Support/Unix/Process.inc<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Process.inc?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Process.inc?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Unix/Process.inc (original)<br class="">+++ llvm/trunk/lib/Support/Unix/Process.inc Tue Apr  5 15:19:49 2016<br class="">@@ -30,9 +30,7 @@<br class=""> #ifdef HAVE_SYS_STAT_H<br class=""> #include <sys/stat.h><br class=""> #endif<br class="">-#if HAVE_SIGNAL_H<br class="">-#include <signal.h><br class="">-#endif<br class="">+#include <csignal><br class=""> // DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for<br class=""> // <stdlib.h> instead. Unix.h includes this for us already.<br class=""> #if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \<br class="">@@ -60,7 +58,9 @@<br class=""> using namespace llvm;<br class=""> using namespace sys;<br class=""><br class="">-static std::pair<TimeValue, TimeValue> getRUsageTimes() {<br class="">+namespace {<br class="">+<br class="">+std::pair<TimeValue, TimeValue> getRUsageTimes() {<br class=""> #if defined(HAVE_GETRUSAGE)<br class="">   struct rusage RU;<br class="">   ::getrusage(RUSAGE_SELF, &RU);<br class="">@@ -79,6 +79,8 @@ static std::pair<TimeValue, TimeValue> g<br class=""> #endif<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> // On Cygwin, getpagesize() returns 64k(AllocationGranularity) and<br class=""> // offset in mmap(3) should be aligned to the AllocationGranularity.<br class=""> unsigned Process::getPageSize() {<br class="">@@ -189,6 +191,7 @@ Process::GetArgumentVector(SmallVectorIm<br class=""> }<br class=""><br class=""> namespace {<br class="">+<br class=""> class FDCloser {<br class=""> public:<br class="">   FDCloser(int &FD) : FD(FD), KeepOpen(false) {}<br class="">@@ -205,7 +208,8 @@ private:<br class="">   int &FD;<br class="">   bool KeepOpen;<br class=""> };<br class="">-}<br class="">+<br class="">+} // end anonymous namespace<br class=""><br class=""> std::error_code Process::FixupStandardFileDescriptors() {<br class="">   int NullFD = -1;<br class="">@@ -300,7 +304,9 @@ bool Process::FileDescriptorIsDisplayed(<br class=""> #endif<br class=""> }<br class=""><br class="">-static unsigned getColumns(int FileID) {<br class="">+namespace {<br class="">+<br class="">+unsigned getColumns(int FileID) {<br class="">   // If COLUMNS is defined in the environment, wrap to that many columns.<br class="">   if (const char *ColumnsStr = std::getenv("COLUMNS")) {<br class="">     int Columns = std::atoi(ColumnsStr);<br class="">@@ -320,6 +326,8 @@ static unsigned getColumns(int FileID) {<br class="">   return Columns;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> unsigned Process::StandardOutColumns() {<br class="">   if (!StandardOutIsDisplayed())<br class="">     return 0;<br class="">@@ -344,11 +352,13 @@ extern "C" int del_curterm(struct term *<br class=""> extern "C" int tigetnum(char *capname);<br class=""> #endif<br class=""><br class="">+namespace {<br class="">+<br class=""> #ifdef HAVE_TERMINFO<br class="">-static ManagedStatic<sys::Mutex> TermColorMutex;<br class="">+ManagedStatic<sys::Mutex> TermColorMutex;<br class=""> #endif<br class=""><br class="">-static bool terminalHasColors(int fd) {<br class="">+bool terminalHasColors(int fd) {<br class=""> #ifdef HAVE_TERMINFO<br class="">   // First, acquire a global lock because these C routines are thread hostile.<br class="">   MutexGuard G(*TermColorMutex);<br class="">@@ -388,6 +398,8 @@ static bool terminalHasColors(int fd) {<br class="">   return false;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> bool Process::FileDescriptorHasColors(int fd) {<br class="">   // A file descriptor has colors if it is displayed and the terminal has<br class="">   // colors.<br class="">@@ -428,7 +440,10 @@ const char *Process::ResetColor() {<br class=""> }<br class=""><br class=""> #if !defined(HAVE_DECL_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM<br class="">-static unsigned GetRandomNumberSeed() {<br class="">+<br class="">+namespace {<br class="">+<br class="">+unsigned GetRandomNumberSeed() {<br class="">   // Attempt to get the initial seed from /dev/urandom, if possible.<br class="">   int urandomFD = open("/dev/urandom", O_RDONLY);<br class=""><br class="">@@ -450,6 +465,9 @@ static unsigned GetRandomNumberSeed() {<br class="">   TimeValue Now = TimeValue::now();<br class="">   return hash_combine(Now.seconds(), Now.nanoseconds(), ::getpid());<br class=""> }<br class="">+<br class="">+} // end anonymous namespace<br class="">+<br class=""> #endif<br class=""><br class=""> unsigned llvm::sys::Process::GetRandomNumber() {<br class=""><br class="">Modified: llvm/trunk/lib/Support/Unix/Program.inc<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Program.inc?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Program.inc?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Unix/Program.inc (original)<br class="">+++ llvm/trunk/lib/Support/Unix/Program.inc Tue Apr  5 15:19:49 2016<br class="">@@ -1,4 +1,4 @@<br class="">-//===- llvm/Support/Unix/Program.cpp -----------------------------*- C++ -*-===//<br class="">+//===- llvm/Support/Unix/Program.cpp ----------------------------*- C++ -*-===//<br class=""> //<br class=""> //                     The LLVM Compiler Infrastructure<br class=""> //<br class="">@@ -30,9 +30,7 @@<br class=""> #if HAVE_SYS_RESOURCE_H<br class=""> #include <sys/resource.h><br class=""> #endif<br class="">-#if HAVE_SIGNAL_H<br class="">-#include <signal.h><br class="">-#endif<br class="">+#include <csignal><br class=""> #if HAVE_FCNTL_H<br class=""> #include <fcntl.h><br class=""> #endif<br class="">@@ -96,7 +94,9 @@ ErrorOr<std::string> sys::findProgramByN<br class="">   return errc::no_such_file_or_directory;<br class=""> }<br class=""><br class="">-static bool RedirectIO(const StringRef *Path, int FD, std::string* ErrMsg) {<br class="">+namespace {<br class="">+<br class="">+bool RedirectIO(const StringRef *Path, int FD, std::string* ErrMsg) {<br class="">   if (!Path) // Noop<br class="">     return false;<br class="">   std::string File;<br class="">@@ -125,8 +125,8 @@ static bool RedirectIO(const StringRef *<br class=""> }<br class=""><br class=""> #ifdef HAVE_POSIX_SPAWN<br class="">-static bool RedirectIO_PS(const std::string *Path, int FD, std::string *ErrMsg,<br class="">-                          posix_spawn_file_actions_t *FileActions) {<br class="">+bool RedirectIO_PS(const std::string *Path, int FD, std::string *ErrMsg,<br class="">+                   posix_spawn_file_actions_t *FileActions) {<br class="">   if (!Path) // Noop<br class="">     return false;<br class="">   const char *File;<br class="">@@ -144,10 +144,10 @@ static bool RedirectIO_PS(const std::str<br class=""> }<br class=""> #endif<br class=""><br class="">-static void TimeOutHandler(int Sig) {<br class="">+void TimeOutHandler(int Sig) {<br class=""> }<br class=""><br class="">-static void SetMemoryLimits (unsigned size)<br class="">+void SetMemoryLimits (unsigned size)<br class=""> {<br class=""> #if HAVE_SYS_RESOURCE_H && HAVE_GETRLIMIT && HAVE_SETRLIMIT<br class="">   struct rlimit r;<br class="">@@ -176,7 +176,9 @@ static void SetMemoryLimits (unsigned si<br class=""> #endif<br class=""> }<br class=""><br class="">-}<br class="">+} // end anonymous namespace<br class="">+<br class="">+} // end namespace llvm<br class=""><br class=""> static bool Execute(ProcessInfo &PI, StringRef Program, const char **args,<br class="">                     const char **envp, const StringRef **redirects,<br class="">@@ -419,12 +421,12 @@ ProcessInfo sys::Wait(const ProcessInfo<br class="">   return WaitResult;<br class=""> }<br class=""><br class="">-  std::error_code sys::ChangeStdinToBinary(){<br class="">+std::error_code sys::ChangeStdinToBinary() {<br class="">   // Do nothing, as Unix doesn't differentiate between text and binary.<br class="">     return std::error_code();<br class=""> }<br class=""><br class="">-  std::error_code sys::ChangeStdoutToBinary(){<br class="">+std::error_code sys::ChangeStdoutToBinary() {<br class="">   // Do nothing, as Unix doesn't differentiate between text and binary.<br class="">     return std::error_code();<br class=""> }<br class="">@@ -466,4 +468,5 @@ bool llvm::sys::commandLineFitsWithinSys<br class="">   }<br class="">   return true;<br class=""> }<br class="">-}<br class="">+<br class="">+} // end namespace llvm<br class=""><br class="">Modified: llvm/trunk/lib/Support/Unix/Signals.inc<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Signals.inc?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Signals.inc?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Unix/Signals.inc (original)<br class="">+++ llvm/trunk/lib/Support/Unix/Signals.inc Tue Apr  5 15:19:49 2016<br class="">@@ -1,4 +1,4 @@<br class="">-//===- Signals.cpp - Generic Unix Signals Implementation -----*- C++ -*-===//<br class="">+//===- Signals.cpp - Generic Unix Signals Implementation --------*- C++ -*-===//<br class=""> //<br class=""> //                     The LLVM Compiler Infrastructure<br class=""> //<br class="">@@ -27,9 +27,7 @@<br class=""> #if HAVE_EXECINFO_H<br class=""> # include <execinfo.h>         // For backtrace().<br class=""> #endif<br class="">-#if HAVE_SIGNAL_H<br class="">-#include <signal.h><br class="">-#endif<br class="">+#include <csignal><br class=""> #if HAVE_SYS_STAT_H<br class=""> #include <sys/stat.h><br class=""> #endif<br class="">@@ -48,25 +46,27 @@<br class=""><br class=""> using namespace llvm;<br class=""><br class="">-static RETSIGTYPE SignalHandler(int Sig);  // defined below.<br class="">+namespace {<br class="">+<br class="">+RETSIGTYPE SignalHandler(int Sig);  // defined below.<br class=""><br class="">-static ManagedStatic<SmartMutex<true> > SignalsMutex;<br class="">+ManagedStatic<SmartMutex<true> > SignalsMutex;<br class=""><br class=""> /// InterruptFunction - The function to call if ctrl-c is pressed.<br class="">-static void (*InterruptFunction)() = nullptr;<br class="">+void (*InterruptFunction)() = nullptr;<br class=""><br class="">-static ManagedStatic<std::vector<std::string>> FilesToRemove;<br class="">+ManagedStatic<std::vector<std::string>> FilesToRemove;<br class=""><br class=""> // IntSigs - Signals that represent requested termination. There's no bug<br class=""> // or failure, or if there is, it's not our direct responsibility. For whatever<br class=""> // reason, our continued execution is no longer desirable.<br class="">-static const int IntSigs[] = {<br class="">+const int IntSigs[] = {<br class="">   SIGHUP, SIGINT, SIGPIPE, SIGTERM, SIGUSR1, SIGUSR2<br class=""> };<br class=""><br class=""> // KillSigs - Signals that represent that we have a bug, and our prompt<br class=""> // termination has been ordered.<br class="">-static const int KillSigs[] = {<br class="">+const int KillSigs[] = {<br class="">   SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGBUS, SIGSEGV, SIGQUIT<br class=""> #ifdef SIGSYS<br class="">   , SIGSYS<br class="">@@ -82,14 +82,13 @@ static const int KillSigs[] = {<br class=""> #endif<br class=""> };<br class=""><br class="">-static unsigned NumRegisteredSignals = 0;<br class="">-static struct {<br class="">+unsigned NumRegisteredSignals = 0;<br class="">+struct {<br class="">   struct sigaction SA;<br class="">   int SigNo;<br class=""> } RegisteredSignalInfo[array_lengthof(IntSigs) + array_lengthof(KillSigs)];<br class=""><br class="">-<br class="">-static void RegisterHandler(int Signal) {<br class="">+void RegisterHandler(int Signal) {<br class="">   assert(NumRegisteredSignals < array_lengthof(RegisteredSignalInfo) &&<br class="">          "Out of space for signal handlers!");<br class=""><br class="">@@ -106,7 +105,7 @@ static void RegisterHandler(int Signal)<br class="">   ++NumRegisteredSignals;<br class=""> }<br class=""><br class="">-static void RegisterHandlers() {<br class="">+void RegisterHandlers() {<br class="">   // We need to dereference the signals mutex during handler registration so<br class="">   // that we force its construction. This is to prevent the first use being<br class="">   // during handling an actual signal because you can't safely call new in a<br class="">@@ -120,7 +119,7 @@ static void RegisterHandlers() {<br class="">   for (auto S : KillSigs) RegisterHandler(S);<br class=""> }<br class=""><br class="">-static void UnregisterHandlers() {<br class="">+void UnregisterHandlers() {<br class="">   // Restore all of the signal handlers to how they were before we showed up.<br class="">   for (unsigned i = 0, e = NumRegisteredSignals; i != e; ++i)<br class="">     sigaction(RegisteredSignalInfo[i].SigNo,<br class="">@@ -128,12 +127,11 @@ static void UnregisterHandlers() {<br class="">   NumRegisteredSignals = 0;<br class=""> }<br class=""><br class="">-<br class=""> /// RemoveFilesToRemove - Process the FilesToRemove list. This function<br class=""> /// should be called with the SignalsMutex lock held.<br class=""> /// NB: This must be an async signal safe function. It cannot allocate or free<br class=""> /// memory, even in debug builds.<br class="">-static void RemoveFilesToRemove() {<br class="">+void RemoveFilesToRemove() {<br class="">   // Avoid constructing ManagedStatic in the signal handler.<br class="">   // If FilesToRemove is not constructed, there are no files to remove.<br class="">   if (!FilesToRemove.isConstructed())<br class="">@@ -164,7 +162,7 @@ static void RemoveFilesToRemove() {<br class=""> }<br class=""><br class=""> // SignalHandler - The signal handler that runs.<br class="">-static RETSIGTYPE SignalHandler(int Sig) {<br class="">+RETSIGTYPE SignalHandler(int Sig) {<br class="">   // Restore the signal behavior to default, so that the program actually<br class="">   // crashes when we return and the signal reissues.  This also ensures that if<br class="">   // we crash in our signal handler that the program will terminate immediately<br class="">@@ -209,6 +207,8 @@ static RETSIGTYPE SignalHandler(int Sig)<br class=""> #endif<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void llvm::sys::RunInterruptHandlers() {<br class="">   sys::SmartScopedLock<true> Guard(*SignalsMutex);<br class="">   RemoveFilesToRemove();<br class="">@@ -264,7 +264,9 @@ struct DlIteratePhdrData {<br class="">   const char *main_exec_name;<br class=""> };<br class=""><br class="">-static int dl_iterate_phdr_cb(dl_phdr_info *info, size_t size, void *arg) {<br class="">+namespace {<br class="">+<br class="">+int dl_iterate_phdr_cb(dl_phdr_info *info, size_t size, void *arg) {<br class="">   DlIteratePhdrData *data = (DlIteratePhdrData*)arg;<br class="">   const char *name = data->first ? data->main_exec_name : info->dlpi_name;<br class="">   data->first = false;<br class="">@@ -287,6 +289,8 @@ static int dl_iterate_phdr_cb(dl_phdr_in<br class="">   return 0;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> /// If this is an ELF platform, we can find all loaded modules and their virtual<br class=""> /// addresses with dl_iterate_phdr.<br class=""> static bool findModulesAndOffsets(void **StackTrace, int Depth,<br class="">@@ -375,10 +379,14 @@ void llvm::sys::PrintStackTrace(raw_ostr<br class=""> #endif<br class=""> }<br class=""><br class="">-static void PrintStackTraceSignalHandler(void *) {<br class="">+namespace {<br class="">+<br class="">+void PrintStackTraceSignalHandler(void *) {<br class="">   PrintStackTrace(llvm::errs());<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void llvm::sys::DisableSystemDialogsOnCrash() {}<br class=""><br class=""> /// PrintStackTraceOnErrorSignal - When an error signal (such as SIGABRT or<br class="">@@ -403,9 +411,6 @@ void llvm::sys::PrintStackTraceOnErrorSi<br class=""> #endif<br class=""> }<br class=""><br class="">-<br class="">-/***/<br class="">-<br class=""> // On Darwin, raise sends a signal to the main thread instead of the current<br class=""> // thread. This has the unfortunate effect that assert() and abort() will end up<br class=""> // bypassing our crash recovery attempts. We work around this for anything in<br class=""><br class="">Modified: llvm/trunk/lib/Support/Unix/ThreadLocal.inc<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/ThreadLocal.inc?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/ThreadLocal.inc?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Unix/ThreadLocal.inc (original)<br class="">+++ llvm/trunk/lib/Support/Unix/ThreadLocal.inc Tue Apr  5 15:19:49 2016<br class="">@@ -19,10 +19,11 @@<br class=""> #if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_GETSPECIFIC)<br class=""><br class=""> #include <cassert><br class="">+#include <cstdlib><br class=""> #include <pthread.h><br class="">-#include <stdlib.h><br class=""><br class=""> namespace llvm {<br class="">+<br class=""> using namespace sys;<br class=""><br class=""> ThreadLocalImpl::ThreadLocalImpl() : data() {<br class="">@@ -56,14 +57,19 @@ void ThreadLocalImpl::removeInstance() {<br class="">   setInstance(nullptr);<br class=""> }<br class=""><br class="">-}<br class="">+} // end namespace llvm<br class=""> #else<br class="">+<br class=""> namespace llvm {<br class="">+<br class=""> using namespace sys;<br class="">+<br class=""> ThreadLocalImpl::ThreadLocalImpl() : data() { }<br class=""> ThreadLocalImpl::~ThreadLocalImpl() { }<br class=""> void ThreadLocalImpl::setInstance(const void* d) { data = const_cast<void*>(d);}<br class=""> void *ThreadLocalImpl::getInstance() { return data; }<br class=""> void ThreadLocalImpl::removeInstance() { setInstance(0); }<br class="">-}<br class="">+<br class="">+} // end namespace llvm<br class="">+<br class=""> #endif<br class=""><br class="">Modified: llvm/trunk/lib/Support/Unix/Unix.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Unix.h?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Unix.h?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Support/Unix/Unix.h (original)<br class="">+++ llvm/trunk/lib/Support/Unix/Unix.h Tue Apr  5 15:19:49 2016<br class="">@@ -1,4 +1,4 @@<br class="">-//===- llvm/Support/Unix/Unix.h - Common Unix Include File -------*- C++ -*-===//<br class="">+//===- llvm/Support/Unix/Unix.h - Common Unix Include File ------*- C++ -*-===//<br class=""> //<br class=""> //                     The LLVM Compiler Infrastructure<br class=""> //<br class="">@@ -22,7 +22,7 @@<br class=""> #include "llvm/Config/config.h"     // Get autoconf configuration settings<br class=""> #include "llvm/Support/Errno.h"<br class=""> #include <algorithm><br class="">-#include <assert.h><br class="">+#include <cassert><br class=""> #include <cerrno><br class=""> #include <cstdio><br class=""> #include <cstdlib><br class="">@@ -42,7 +42,7 @@<br class=""> #ifdef HAVE_SYS_TIME_H<br class=""> # include <sys/time.h><br class=""> #endif<br class="">-#include <time.h><br class="">+#include <ctime><br class=""><br class=""> #ifdef HAVE_DLFCN_H<br class=""> # include <dlfcn.h><br class="">@@ -65,4 +65,4 @@ static inline bool MakeErrMsg(<br class="">   return true;<br class=""> }<br class=""><br class="">-#endif<br class="">+#endif // LLVM_LIB_SUPPORT_UNIX_UNIX_H<br class=""><br class="">Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)<br class="">+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -34,7 +34,8 @@<br class=""> #include "llvm/Support/raw_ostream.h"<br class=""> #include "llvm/Target/TargetMachine.h"<br class=""> #include "llvm/Target/TargetOptions.h"<br class="">-#include <stdint.h><br class="">+#include <cstdint><br class="">+<br class=""> using namespace llvm;<br class=""><br class=""> #define DEBUG_TYPE "x86-isel"<br class="">@@ -141,7 +142,7 @@ namespace {<br class="">     }<br class=""> #endif<br class="">   };<br class="">-}<br class="">+} // end anonymous namespace<br class=""><br class=""> namespace {<br class="">   //===--------------------------------------------------------------------===//<br class="">@@ -301,7 +302,6 @@ namespace {<br class="">       // Walk all the users of the immediate.<br class="">       for (SDNode::use_iterator UI = N->use_begin(),<br class="">            UE = N->use_end(); (UI != UE) && (UseCount < 2); ++UI) {<br class="">-<br class="">         SDNode *User = *UI;<br class=""><br class="">         // This user is already selected. Count it as a legitimate use and<br class="">@@ -393,8 +393,7 @@ namespace {<br class="">       return true;<br class="">     }<br class="">   };<br class="">-}<br class="">-<br class="">+} // end anonymous namespace<br class=""><br class=""> bool<br class=""> X86DAGToDAGISel::IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const {<br class="">@@ -459,10 +458,12 @@ X86DAGToDAGISel::IsProfitableToFold(SDVa<br class="">   return true;<br class=""> }<br class=""><br class="">+namespace {<br class="">+<br class=""> /// Replace the original chain operand of the call with<br class=""> /// load's chain operand and move load below the call's chain operand.<br class="">-static void moveBelowOrigChain(SelectionDAG *CurDAG, SDValue Load,<br class="">-                               SDValue Call, SDValue OrigChain) {<br class="">+void moveBelowOrigChain(SelectionDAG *CurDAG, SDValue Load, SDValue Call,<br class="">+                        SDValue OrigChain) {<br class="">   SmallVector<SDValue, 8> Ops;<br class="">   SDValue Chain = OrigChain.getOperand(0);<br class="">   if (Chain.getNode() == Load.getNode())<br class="">@@ -496,7 +497,7 @@ static void moveBelowOrigChain(Selection<br class=""> /// Return the CALLSEQ_START by reference as a second output.<br class=""> /// In the case of a tail call, there isn't a callseq node between the call<br class=""> /// chain and the load.<br class="">-static bool isCalleeLoad(SDValue Callee, SDValue &Chain, bool HasCallSeq) {<br class="">+bool isCalleeLoad(SDValue Callee, SDValue &Chain, bool HasCallSeq) {<br class="">   // The transformation is somewhat dangerous if the call's chain was glued to<br class="">   // the call. After MoveBelowOrigChain the load is moved between the call and<br class="">   // the chain, this can create a cycle if the load is not folded. So it is<br class="">@@ -533,6 +534,8 @@ static bool isCalleeLoad(SDValue Callee,<br class="">   return false;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void X86DAGToDAGISel::PreprocessISelDAG() {<br class="">   // OptFor[Min]Size are used in pattern predicates that isel is matching.<br class="">   OptForSize = MF->getFunction()->optForSize();<br class="">@@ -651,7 +654,6 @@ void X86DAGToDAGISel::PreprocessISelDAG(<br class="">   }<br class=""> }<br class=""><br class="">-<br class=""> /// Emit any code that needs to be executed only in the main function.<br class=""> void X86DAGToDAGISel::emitSpecialCodeForMain() {<br class="">   if (Subtarget->isTargetCygMing()) {<br class="">@@ -676,7 +678,9 @@ void X86DAGToDAGISel::EmitFunctionEntryC<br class="">       emitSpecialCodeForMain();<br class=""> }<br class=""><br class="">-static bool isDispSafeForFrameIndex(int64_t Val) {<br class="">+namespace {<br class="">+<br class="">+bool isDispSafeForFrameIndex(int64_t Val) {<br class="">   // On 64-bit platforms, we can run into an issue where a frame index<br class="">   // includes a displacement that, when added to the explicit displacement,<br class="">   // will overflow the displacement field. Assuming that the frame index<br class="">@@ -686,6 +690,8 @@ static bool isDispSafeForFrameIndex(int6<br class="">   return isInt<31>(Val);<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> bool X86DAGToDAGISel::foldOffsetIntoAddress(uint64_t Offset,<br class="">                                             X86ISelAddressMode &AM) {<br class="">   // Cannot combine ExternalSymbol displacements with integer offsets.<br class="">@@ -705,7 +711,6 @@ bool X86DAGToDAGISel::foldOffsetIntoAddr<br class="">   }<br class="">   AM.Disp = Val;<br class="">   return false;<br class="">-<br class=""> }<br class=""><br class=""> bool X86DAGToDAGISel::matchLoadInAddress(LoadSDNode *N, X86ISelAddressMode &AM){<br class="">@@ -896,12 +901,14 @@ bool X86DAGToDAGISel::matchAdd(SDValue N<br class="">   return true;<br class=""> }<br class=""><br class="">+namespace {<br class="">+<br class=""> // Insert a node into the DAG at least before the Pos node's position. This<br class=""> // will reposition the node as needed, and will assign it a node ID that is <=<br class=""> // the Pos node's ID. Note that this does *not* preserve the uniqueness of node<br class=""> // IDs! The selection DAG must no longer depend on their uniqueness when this<br class=""> // is used.<br class="">-static void insertDAGNode(SelectionDAG &DAG, SDValue Pos, SDValue N) {<br class="">+void insertDAGNode(SelectionDAG &DAG, SDValue Pos, SDValue N) {<br class="">   if (N.getNode()->getNodeId() == -1 ||<br class="">       N.getNode()->getNodeId() > Pos.getNode()->getNodeId()) {<br class="">     DAG.RepositionNode(Pos.getNode()->getIterator(), N.getNode());<br class="">@@ -913,10 +920,9 @@ static void insertDAGNode(SelectionDAG &<br class=""> // safe. This allows us to convert the shift and and into an h-register<br class=""> // extract and a scaled index. Returns false if the simplification is<br class=""> // performed.<br class="">-static bool foldMaskAndShiftToExtract(SelectionDAG &DAG, SDValue N,<br class="">-                                      uint64_t Mask,<br class="">-                                      SDValue Shift, SDValue X,<br class="">-                                      X86ISelAddressMode &AM) {<br class="">+bool foldMaskAndShiftToExtract(SelectionDAG &DAG, SDValue N, uint64_t Mask,<br class="">+                               SDValue Shift, SDValue X,<br class="">+                               X86ISelAddressMode &AM) {<br class="">   if (Shift.getOpcode() != ISD::SRL ||<br class="">       !isa<ConstantSDNode>(Shift.getOperand(1)) ||<br class="">       !Shift.hasOneUse())<br class="">@@ -956,10 +962,9 @@ static bool foldMaskAndShiftToExtract(Se<br class=""> // Transforms "(X << C1) & C2" to "(X & (C2>>C1)) << C1" if safe and if this<br class=""> // allows us to fold the shift into this addressing mode. Returns false if the<br class=""> // transform succeeded.<br class="">-static bool foldMaskedShiftToScaledMask(SelectionDAG &DAG, SDValue N,<br class="">-                                        uint64_t Mask,<br class="">-                                        SDValue Shift, SDValue X,<br class="">-                                        X86ISelAddressMode &AM) {<br class="">+bool foldMaskedShiftToScaledMask(SelectionDAG &DAG, SDValue N, uint64_t Mask,<br class="">+                                 SDValue Shift, SDValue X,<br class="">+                                 X86ISelAddressMode &AM) {<br class="">   if (Shift.getOpcode() != ISD::SHL ||<br class="">       !isa<ConstantSDNode>(Shift.getOperand(1)))<br class="">     return true;<br class="">@@ -1023,10 +1028,8 @@ static bool foldMaskedShiftToScaledMask(<br class=""> // Note that this function assumes the mask is provided as a mask *after* the<br class=""> // value is shifted. The input chain may or may not match that, but computing<br class=""> // such a mask is trivial.<br class="">-static bool foldMaskAndShiftToScale(SelectionDAG &DAG, SDValue N,<br class="">-                                    uint64_t Mask,<br class="">-                                    SDValue Shift, SDValue X,<br class="">-                                    X86ISelAddressMode &AM) {<br class="">+bool foldMaskAndShiftToScale(SelectionDAG &DAG, SDValue N, uint64_t Mask,<br class="">+                             SDValue Shift, SDValue X, X86ISelAddressMode &AM) {<br class="">   if (Shift.getOpcode() != ISD::SRL || !Shift.hasOneUse() ||<br class="">       !isa<ConstantSDNode>(Shift.getOperand(1)))<br class="">     return true;<br class="">@@ -1104,6 +1107,8 @@ static bool foldMaskAndShiftToScale(Sele<br class="">   return false;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> bool X86DAGToDAGISel::matchAddressRecursively(SDValue N, X86ISelAddressMode &AM,<br class="">                                               unsigned Depth) {<br class="">   SDLoc dl(N);<br class="">@@ -1418,7 +1423,6 @@ bool X86DAGToDAGISel::matchAddressBase(S<br class=""> bool X86DAGToDAGISel::selectVectorAddr(SDNode *Parent, SDValue N, SDValue &Base,<br class="">                                       SDValue &Scale, SDValue &Index,<br class="">                                       SDValue &Disp, SDValue &Segment) {<br class="">-<br class="">   MaskedGatherScatterSDNode *Mgs = dyn_cast<MaskedGatherScatterSDNode>(Parent);<br class="">   if (!Mgs)<br class="">     return false;<br class="">@@ -1541,7 +1545,6 @@ bool X86DAGToDAGISel::selectScalarSSELoa<br class="">   return false;<br class=""> }<br class=""><br class="">-<br class=""> bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) {<br class="">   if (const ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N)) {<br class="">     uint64_t ImmVal = CN->getZExtValue();<br class="">@@ -1695,7 +1698,6 @@ bool X86DAGToDAGISel::selectTLSADDRAddr(<br class="">   return true;<br class=""> }<br class=""><br class="">-<br class=""> bool X86DAGToDAGISel::tryFoldLoad(SDNode *P, SDValue N,<br class="">                                   SDValue &Base, SDValue &Scale,<br class="">                                   SDValue &Index, SDValue &Disp,<br class="">@@ -1718,9 +1720,11 @@ SDNode *X86DAGToDAGISel::getGlobalBaseRe<br class="">   return CurDAG->getRegister(GlobalBaseReg, TLI->getPointerTy(DL)).getNode();<br class=""> }<br class=""><br class="">+namespace {<br class="">+<br class=""> /// Test whether the given X86ISD::CMP node has any uses which require the SF<br class=""> /// or OF bits to be accurate.<br class="">-static bool hasNoSignedComparisonUses(SDNode *N) {<br class="">+bool hasNoSignedComparisonUses(SDNode *N) {<br class="">   // Examine each user of the node.<br class="">   for (SDNode::use_iterator UI = N->use_begin(),<br class="">          UE = N->use_end(); UI != UE; ++UI) {<br class="">@@ -1782,10 +1786,9 @@ static bool hasNoSignedComparisonUses(SD<br class=""><br class=""> /// Check whether or not the chain ending in StoreNode is suitable for doing<br class=""> /// the {load; increment or decrement; store} to modify transformation.<br class="">-static bool isLoadIncOrDecStore(StoreSDNode *StoreNode, unsigned Opc,<br class="">-                                SDValue StoredVal, SelectionDAG *CurDAG,<br class="">-                                LoadSDNode* &LoadNode, SDValue &InputChain) {<br class="">-<br class="">+bool isLoadIncOrDecStore(StoreSDNode *StoreNode, unsigned Opc,<br class="">+                          SDValue StoredVal, SelectionDAG *CurDAG,<br class="">+                          LoadSDNode* &LoadNode, SDValue &InputChain) {<br class="">   // is the value stored the result of a DEC or INC?<br class="">   if (!(Opc == X86ISD::DEC || Opc == X86ISD::INC)) return false;<br class=""><br class="">@@ -1867,7 +1870,7 @@ static bool isLoadIncOrDecStore(StoreSDN<br class=""><br class=""> /// Get the appropriate X86 opcode for an in-memory increment or decrement.<br class=""> /// Opc should be X86ISD::DEC or X86ISD::INC.<br class="">-static unsigned getFusedLdStOpcode(EVT &LdVT, unsigned Opc) {<br class="">+unsigned getFusedLdStOpcode(EVT &LdVT, unsigned Opc) {<br class="">   if (Opc == X86ISD::DEC) {<br class="">     if (LdVT == MVT::i64) return X86::DEC64m;<br class="">     if (LdVT == MVT::i32) return X86::DEC32m;<br class="">@@ -1883,6 +1886,8 @@ static unsigned getFusedLdStOpcode(EVT &<br class="">   llvm_unreachable("unrecognized size for LdVT");<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> /// Customized ISel for GATHER operations.<br class=""> SDNode *X86DAGToDAGISel::selectGather(SDNode *Node, unsigned Opc) {<br class="">   // Operands of Gather: VSrc, Base, VIdx, VMask, Scale<br class=""><br class="">Modified: llvm/trunk/tools/llvm-c-test/echo.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-c-test/echo.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-c-test/echo.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/tools/llvm-c-test/echo.cpp (original)<br class="">+++ llvm/trunk/tools/llvm-c-test/echo.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -16,12 +16,18 @@<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class=""> #include "llvm-c-test.h"<br class="">+#include "llvm-c/Core.h"<br class="">+#include "llvm-c/ErrorHandling.h"<br class=""> #include "llvm-c/Target.h"<br class="">+#include "llvm-c/Types.h"<br class=""> #include "llvm/ADT/DenseMap.h"<br class="">+#include "llvm/ADT/Hashing.h"<br class="">+#include "llvm/ADT/SmallVector.h"<br class=""> #include "llvm/Support/ErrorHandling.h"<br class=""><br class="">-#include <stdio.h><br class="">-#include <stdlib.h><br class="">+#include <cstdio><br class="">+#include <cstdlib><br class="">+#include <cstring><br class=""><br class=""> using namespace llvm;<br class=""><br class="">@@ -39,13 +45,16 @@ struct CAPIDenseMap<T*> {<br class="">       uintptr_t Val = static_cast<uintptr_t>(-1);<br class="">       return reinterpret_cast<T*>(Val);<br class="">     }<br class="">+<br class="">     static inline T* getTombstoneKey() {<br class="">       uintptr_t Val = static_cast<uintptr_t>(-2);<br class="">       return reinterpret_cast<T*>(Val);<br class="">     }<br class="">+<br class="">     static unsigned getHashValue(const T *PtrVal) {<br class="">       return hash_value(PtrVal);<br class="">     }<br class="">+<br class="">     static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }<br class="">   };<br class=""><br class="">@@ -154,7 +163,9 @@ struct TypeCloner {<br class="">   }<br class=""> };<br class=""><br class="">-static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) {<br class="">+namespace {<br class="">+<br class="">+ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) {<br class="">   unsigned Count = LLVMCountParams(Src);<br class="">   if (Count != LLVMCountParams(Dst))<br class="">     report_fatal_error("Parameter count mismatch");<br class="">@@ -212,6 +223,8 @@ static ValueMap clone_params(LLVMValueRe<br class="">   return VMap;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) {<br class="">   if (!LLVMIsAConstant(Cst))<br class="">     report_fatal_error("Expected a constant");<br class="">@@ -710,7 +723,9 @@ struct FunCloner {<br class="">   }<br class=""> };<br class=""><br class="">-static void declare_symbols(LLVMModuleRef Src, LLVMModuleRef M) {<br class="">+namespace {<br class="">+<br class="">+void declare_symbols(LLVMModuleRef Src, LLVMModuleRef M) {<br class="">   LLVMValueRef Begin = LLVMGetFirstGlobal(Src);<br class="">   LLVMValueRef End = LLVMGetLastGlobal(Src);<br class=""><br class="">@@ -774,7 +789,7 @@ FunDecl:<br class="">   }<br class=""> }<br class=""><br class="">-static void clone_symbols(LLVMModuleRef Src, LLVMModuleRef M) {<br class="">+void clone_symbols(LLVMModuleRef Src, LLVMModuleRef M) {<br class="">   LLVMValueRef Begin = LLVMGetFirstGlobal(Src);<br class="">   LLVMValueRef End = LLVMGetLastGlobal(Src);<br class=""><br class="">@@ -861,6 +876,8 @@ FunClone:<br class="">   }<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> int llvm_echo(void) {<br class="">   LLVMEnablePrettyStackTrace();<br class=""><br class=""><br class="">Modified: llvm/trunk/tools/llvm-c-test/llvm-c-test.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-c-test/llvm-c-test.h?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-c-test/llvm-c-test.h?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/tools/llvm-c-test/llvm-c-test.h (original)<br class="">+++ llvm/trunk/tools/llvm-c-test/llvm-c-test.h Tue Apr  5 15:19:49 2016<br class="">@@ -10,10 +10,15 @@<br class=""> |* Header file for llvm-c-test                                                *|<br class=""> |*                                                                            *|<br class=""> \*===----------------------------------------------------------------------===*/<br class="">+<br class=""> #ifndef LLVM_C_TEST_H<br class=""> #define LLVM_C_TEST_H<br class=""><br class="">+#ifdef __cplusplus<br class="">+#include <cstdbool><br class="">+#else<br class=""> #include <stdbool.h><br class="">+#endif<br class=""> #include "llvm-c/Core.h"<br class=""><br class=""> #ifdef __cplusplus<br class="">@@ -51,6 +56,6 @@ int llvm_echo(void);<br class=""><br class=""> #ifdef __cplusplus<br class=""> }<br class="">-#endif /* !defined(__cplusplus) */<br class="">-<br class=""> #endif<br class="">+<br class="">+#endif // LLVM_C_TEST_H<br class=""><br class="">Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)<br class="">+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -40,9 +40,14 @@<br class=""> #include "llvm/Support/Win64EH.h"<br class=""> #include "llvm/Support/raw_ostream.h"<br class=""> #include <algorithm><br class="">-#include <cstring><br class="">+#include <cassert><br class="">+#include <cstdint><br class="">+#include <ctime><br class="">+#include <memory><br class="">+#include <string><br class="">+#include <tuple><br class=""> #include <system_error><br class="">-#include <time.h><br class="">+#include <vector><br class=""><br class=""> using namespace llvm;<br class=""> using namespace llvm::object;<br class="">@@ -71,6 +76,7 @@ public:<br class="">   void printCOFFBaseReloc() override;<br class="">   void printCodeViewDebugInfo() override;<br class="">   void printStackMap() const override;<br class="">+<br class=""> private:<br class="">   void printSymbol(const SymbolRef &Sym);<br class="">   void printRelocation(const SectionRef &Section, const RelocationRef &Reloc,<br class="">@@ -144,8 +150,7 @@ private:<br class="">   StringSet<> TypeNames;<br class=""> };<br class=""><br class="">-} // namespace<br class="">-<br class="">+} // end anonymous namespace<br class=""><br class=""> namespace llvm {<br class=""><br class="">@@ -160,7 +165,7 @@ std::error_code createCOFFDumper(const o<br class="">   return readobj_error::success;<br class=""> }<br class=""><br class="">-} // namespace llvm<br class="">+} // end namespace llvm<br class=""><br class=""> // Given a a section and an offset into this section the function returns the<br class=""> // symbol used for the relocation at the offset.<br class="">@@ -243,7 +248,9 @@ void COFFDumper::printBinaryBlockWithRel<br class="">   }<br class=""> }<br class=""><br class="">-static const EnumEntry<COFF::MachineTypes> ImageFileMachineType[] = {<br class="">+namespace {<br class="">+<br class="">+const EnumEntry<COFF::MachineTypes> ImageFileMachineType[] = {<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_UNKNOWN  ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_AM33     ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_AMD64    ),<br class="">@@ -267,7 +274,7 @@ static const EnumEntry<COFF::MachineType<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_WCEMIPSV2)<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::Characteristics> ImageFileCharacteristics[] = {<br class="">+const EnumEntry<COFF::Characteristics> ImageFileCharacteristics[] = {<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_RELOCS_STRIPPED        ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_EXECUTABLE_IMAGE       ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_LINE_NUMS_STRIPPED     ),<br class="">@@ -285,7 +292,7 @@ static const EnumEntry<COFF::Characteris<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_BYTES_REVERSED_HI      )<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::WindowsSubsystem> PEWindowsSubsystem[] = {<br class="">+const EnumEntry<COFF::WindowsSubsystem> PEWindowsSubsystem[] = {<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SUBSYSTEM_UNKNOWN                ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SUBSYSTEM_NATIVE                 ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SUBSYSTEM_WINDOWS_GUI            ),<br class="">@@ -299,7 +306,7 @@ static const EnumEntry<COFF::WindowsSubs<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SUBSYSTEM_XBOX                   ),<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::DLLCharacteristics> PEDLLCharacteristics[] = {<br class="">+const EnumEntry<COFF::DLLCharacteristics> PEDLLCharacteristics[] = {<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA      ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE         ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY      ),<br class="">@@ -313,7 +320,7 @@ static const EnumEntry<COFF::DLLCharacte<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE),<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::SectionCharacteristics><br class="">+const EnumEntry<COFF::SectionCharacteristics><br class=""> ImageSectionCharacteristics[] = {<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SCN_TYPE_NOLOAD           ),<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SCN_TYPE_NO_PAD           ),<br class="">@@ -353,7 +360,7 @@ ImageSectionCharacteristics[] = {<br class="">   LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_SCN_MEM_WRITE             )<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::SymbolBaseType> ImageSymType[] = {<br class="">+const EnumEntry<COFF::SymbolBaseType> ImageSymType[] = {<br class="">   { "Null"  , COFF::IMAGE_SYM_TYPE_NULL   },<br class="">   { "Void"  , COFF::IMAGE_SYM_TYPE_VOID   },<br class="">   { "Char"  , COFF::IMAGE_SYM_TYPE_CHAR   },<br class="">@@ -372,14 +379,14 @@ static const EnumEntry<COFF::SymbolBaseT<br class="">   { "DWord" , COFF::IMAGE_SYM_TYPE_DWORD  }<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::SymbolComplexType> ImageSymDType[] = {<br class="">+const EnumEntry<COFF::SymbolComplexType> ImageSymDType[] = {<br class="">   { "Null"    , COFF::IMAGE_SYM_DTYPE_NULL     },<br class="">   { "Pointer" , COFF::IMAGE_SYM_DTYPE_POINTER  },<br class="">   { "Function", COFF::IMAGE_SYM_DTYPE_FUNCTION },<br class="">   { "Array"   , COFF::IMAGE_SYM_DTYPE_ARRAY    }<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::SymbolStorageClass> ImageSymClass[] = {<br class="">+const EnumEntry<COFF::SymbolStorageClass> ImageSymClass[] = {<br class="">   { "EndOfFunction"  , COFF::IMAGE_SYM_CLASS_END_OF_FUNCTION  },<br class="">   { "Null"           , COFF::IMAGE_SYM_CLASS_NULL             },<br class="">   { "Automatic"      , COFF::IMAGE_SYM_CLASS_AUTOMATIC        },<br class="">@@ -409,7 +416,7 @@ static const EnumEntry<COFF::SymbolStora<br class="">   { "CLRToken"       , COFF::IMAGE_SYM_CLASS_CLR_TOKEN        }<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::COMDATType> ImageCOMDATSelect[] = {<br class="">+const EnumEntry<COFF::COMDATType> ImageCOMDATSelect[] = {<br class="">   { "NoDuplicates", COFF::IMAGE_COMDAT_SELECT_NODUPLICATES },<br class="">   { "Any"         , COFF::IMAGE_COMDAT_SELECT_ANY          },<br class="">   { "SameSize"    , COFF::IMAGE_COMDAT_SELECT_SAME_SIZE    },<br class="">@@ -419,14 +426,14 @@ static const EnumEntry<COFF::COMDATType><br class="">   { "Newest"      , COFF::IMAGE_COMDAT_SELECT_NEWEST       }<br class=""> };<br class=""><br class="">-static const EnumEntry<COFF::WeakExternalCharacteristics><br class="">+const EnumEntry<COFF::WeakExternalCharacteristics><br class=""> WeakExternalCharacteristics[] = {<br class="">   { "NoLibrary", COFF::IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY },<br class="">   { "Library"  , COFF::IMAGE_WEAK_EXTERN_SEARCH_LIBRARY   },<br class="">   { "Alias"    , COFF::IMAGE_WEAK_EXTERN_SEARCH_ALIAS     }<br class=""> };<br class=""><br class="">-static const EnumEntry<CompileSym3::Flags> CompileSym3Flags[] = {<br class="">+const EnumEntry<CompileSym3::Flags> CompileSym3Flags[] = {<br class="">     LLVM_READOBJ_ENUM_ENT(CompileSym3, EC),<br class="">     LLVM_READOBJ_ENUM_ENT(CompileSym3, NoDbgInfo),<br class="">     LLVM_READOBJ_ENUM_ENT(CompileSym3, LTCG),<br class="">@@ -441,7 +448,7 @@ static const EnumEntry<CompileSym3::Flag<br class="">     LLVM_READOBJ_ENUM_ENT(CompileSym3, Exp),<br class=""> };<br class=""><br class="">-static const EnumEntry<codeview::SourceLanguage> SourceLanguages[] = {<br class="">+const EnumEntry<codeview::SourceLanguage> SourceLanguages[] = {<br class="">     LLVM_READOBJ_ENUM_ENT(SourceLanguage, C),<br class="">     LLVM_READOBJ_ENUM_ENT(SourceLanguage, Cpp),<br class="">     LLVM_READOBJ_ENUM_ENT(SourceLanguage, Fortran),<br class="">@@ -461,7 +468,7 @@ static const EnumEntry<codeview::SourceL<br class="">     LLVM_READOBJ_ENUM_ENT(SourceLanguage, HLSL),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint32_t> SubSectionTypes[] = {<br class="">+const EnumEntry<uint32_t> SubSectionTypes[] = {<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ModuleSubstreamKind, Symbols),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ModuleSubstreamKind, Lines),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ModuleSubstreamKind, StringTable),<br class="">@@ -477,7 +484,7 @@ static const EnumEntry<uint32_t> SubSect<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ModuleSubstreamKind, CoffSymbolRVA),<br class=""> };<br class=""><br class="">-static const EnumEntry<unsigned> CPUTypeNames[] = {<br class="">+const EnumEntry<unsigned> CPUTypeNames[] = {<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(CPUType, Intel8080),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(CPUType, Intel8086),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(CPUType, Intel80286),<br class="">@@ -539,7 +546,7 @@ static const EnumEntry<unsigned> CPUType<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(CPUType, D3D11_Shader),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> ProcSymFlags[] = {<br class="">+const EnumEntry<uint8_t> ProcSymFlags[] = {<br class="">     LLVM_READOBJ_ENUM_ENT(ProcFlags, HasFP),<br class="">     LLVM_READOBJ_ENUM_ENT(ProcFlags, HasIRET),<br class="">     LLVM_READOBJ_ENUM_ENT(ProcFlags, HasFRET),<br class="">@@ -550,7 +557,7 @@ static const EnumEntry<uint8_t> ProcSymF<br class="">     LLVM_READOBJ_ENUM_ENT(ProcFlags, HasOptimizedDebugInfo),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint32_t> FrameProcSymFlags[] = {<br class="">+const EnumEntry<uint32_t> FrameProcSymFlags[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FrameProcedureOptions, HasAlloca),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FrameProcedureOptions, HasSetJmp),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FrameProcedureOptions, HasLongJmp),<br class="">@@ -576,13 +583,13 @@ static const EnumEntry<uint32_t> FramePr<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FrameProcedureOptions, GuardCfw),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint32_t> FrameDataFlags[] = {<br class="">+const EnumEntry<uint32_t> FrameDataFlags[] = {<br class="">     LLVM_READOBJ_ENUM_ENT(FrameData, HasSEH),<br class="">     LLVM_READOBJ_ENUM_ENT(FrameData, HasEH),<br class="">     LLVM_READOBJ_ENUM_ENT(FrameData, IsFunctionStart),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> LocalFlags[] = {<br class="">+const EnumEntry<uint16_t> LocalFlags[] = {<br class="">     LLVM_READOBJ_ENUM_ENT(LocalSym, IsParameter),<br class="">     LLVM_READOBJ_ENUM_ENT(LocalSym, IsAddressTaken),<br class="">     LLVM_READOBJ_ENUM_ENT(LocalSym, IsCompilerGenerated),<br class="">@@ -596,14 +603,14 @@ static const EnumEntry<uint16_t> LocalFl<br class="">     LLVM_READOBJ_ENUM_ENT(LocalSym, IsEnregisteredStatic),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> FrameCookieKinds[] = {<br class="">+const EnumEntry<uint16_t> FrameCookieKinds[] = {<br class="">     LLVM_READOBJ_ENUM_ENT(FrameCookieSym, Copy),<br class="">     LLVM_READOBJ_ENUM_ENT(FrameCookieSym, XorStackPointer),<br class="">     LLVM_READOBJ_ENUM_ENT(FrameCookieSym, XorFramePointer),<br class="">     LLVM_READOBJ_ENUM_ENT(FrameCookieSym, XorR13),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> ClassOptionNames[] = {<br class="">+const EnumEntry<uint16_t> ClassOptionNames[] = {<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ClassOptions, Packed),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ClassOptions, HasConstructorOrDestructor),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ClassOptions, HasOverloadedOperator),<br class="">@@ -618,14 +625,14 @@ static const EnumEntry<uint16_t> ClassOp<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(ClassOptions, Intrinsic),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> MemberAccessNames[] = {<br class="">+const EnumEntry<uint8_t> MemberAccessNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MemberAccess, None),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MemberAccess, Private),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MemberAccess, Protected),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MemberAccess, Public),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> MethodOptionNames[] = {<br class="">+const EnumEntry<uint16_t> MethodOptionNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodOptions, Pseudo),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodOptions, NoInherit),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodOptions, NoConstruct),<br class="">@@ -633,7 +640,7 @@ static const EnumEntry<uint16_t> MethodO<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodOptions, Sealed),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> MemberKindNames[] = {<br class="">+const EnumEntry<uint16_t> MemberKindNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodKind, Vanilla),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodKind, Virtual),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(MethodKind, Static),<br class="">@@ -646,7 +653,7 @@ static const EnumEntry<uint16_t> MemberK<br class=""> /// The names here all end in "*". If the simple type is a pointer type, we<br class=""> /// return the whole name. Otherwise we lop off the last character in our<br class=""> /// StringRef.<br class="">-static const EnumEntry<SimpleTypeKind> SimpleTypeNames[] = {<br class="">+const EnumEntry<SimpleTypeKind> SimpleTypeNames[] = {<br class="">     {"void*", SimpleTypeKind::Void},<br class="">     {"<not translated>*", SimpleTypeKind::NotTranslated},<br class="">     {"HRESULT*", SimpleTypeKind::HResult},<br class="">@@ -687,12 +694,12 @@ static const EnumEntry<SimpleTypeKind> S<br class="">     {"__bool64*", SimpleTypeKind::Boolean64},<br class=""> };<br class=""><br class="">-static const EnumEntry<TypeLeafKind> LeafTypeNames[] = {<br class="">+const EnumEntry<TypeLeafKind> LeafTypeNames[] = {<br class=""> #define LEAF_TYPE(name, val) LLVM_READOBJ_ENUM_ENT(TypeLeafKind, name),<br class=""> #include "llvm/DebugInfo/CodeView/CVLeafTypes.def"<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> PtrKindNames[] = {<br class="">+const EnumEntry<uint8_t> PtrKindNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerKind, Near16),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerKind, Far16),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerKind, Huge16),<br class="">@@ -708,7 +715,7 @@ static const EnumEntry<uint8_t> PtrKindN<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerKind, Near64),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> PtrModeNames[] = {<br class="">+const EnumEntry<uint8_t> PtrModeNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerMode, Pointer),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerMode, LValueReference),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerMode, PointerToDataMember),<br class="">@@ -716,7 +723,7 @@ static const EnumEntry<uint8_t> PtrModeN<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerMode, RValueReference),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> PtrMemberRepNames[] = {<br class="">+const EnumEntry<uint16_t> PtrMemberRepNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerToMemberRepresentation, Unknown),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerToMemberRepresentation,<br class="">                                 SingleInheritanceData),<br class="">@@ -734,13 +741,13 @@ static const EnumEntry<uint16_t> PtrMemb<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(PointerToMemberRepresentation, GeneralFunction),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint16_t> TypeModifierNames[] = {<br class="">+const EnumEntry<uint16_t> TypeModifierNames[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(ModifierOptions, Const),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(ModifierOptions, Volatile),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(ModifierOptions, Unaligned),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> CallingConventions[] = {<br class="">+const EnumEntry<uint8_t> CallingConventions[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(CallingConvention, NearC),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(CallingConvention, FarC),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(CallingConvention, NearPascal),<br class="">@@ -767,13 +774,13 @@ static const EnumEntry<uint8_t> CallingC<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(CallingConvention, NearVector),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> FunctionOptionEnum[] = {<br class="">+const EnumEntry<uint8_t> FunctionOptionEnum[] = {<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FunctionOptions, CxxReturnUdt),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FunctionOptions, Constructor),<br class="">     LLVM_READOBJ_ENUM_CLASS_ENT(FunctionOptions, ConstructorWithVirtualBases),<br class=""> };<br class=""><br class="">-static const EnumEntry<uint8_t> FileChecksumKindNames[] = {<br class="">+const EnumEntry<uint8_t> FileChecksumKindNames[] = {<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(FileChecksumKind, None),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(FileChecksumKind, MD5),<br class="">   LLVM_READOBJ_ENUM_CLASS_ENT(FileChecksumKind, SHA1),<br class="">@@ -781,7 +788,7 @@ static const EnumEntry<uint8_t> FileChec<br class=""> };<br class=""><br class=""> template <typename T><br class="">-static std::error_code getSymbolAuxData(const COFFObjectFile *Obj,<br class="">+std::error_code getSymbolAuxData(const COFFObjectFile *Obj,<br class="">                                         COFFSymbolRef Symbol,<br class="">                                         uint8_t AuxSymbolIdx, const T *&Aux) {<br class="">   ArrayRef<uint8_t> AuxData = Obj->getSymbolAuxData(Symbol);<br class="">@@ -790,6 +797,8 @@ static std::error_code getSymbolAuxData(<br class="">   return readobj_error::success;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void COFFDumper::cacheRelocations() {<br class="">   if (RelocCached)<br class="">     return;<br class="">@@ -940,11 +949,13 @@ void COFFDumper::printCodeViewDebugInfo(<br class="">   }<br class=""> }<br class=""><br class="">+namespace {<br class="">+<br class=""> /// Consumes sizeof(T) bytes from the given byte sequence. Returns an error if<br class=""> /// there are not enough bytes remaining. Reinterprets the consumed bytes as a<br class=""> /// T object and points 'Res' at them.<br class=""> template <typename T><br class="">-static std::error_code consumeObject(StringRef &Data, const T *&Res) {<br class="">+std::error_code consumeObject(StringRef &Data, const T *&Res) {<br class="">   if (Data.size() < sizeof(*Res))<br class="">     return object_error::parse_failed;<br class="">   Res = reinterpret_cast<const T *>(Data.data());<br class="">@@ -952,7 +963,7 @@ static std::error_code consumeObject(Str<br class="">   return std::error_code();<br class=""> }<br class=""><br class="">-static std::error_code consumeUInt32(StringRef &Data, uint32_t &Res) {<br class="">+std::error_code consumeUInt32(StringRef &Data, uint32_t &Res) {<br class="">   const ulittle32_t *IntPtr;<br class="">   if (auto EC = consumeObject(Data, IntPtr))<br class="">     return EC;<br class="">@@ -960,6 +971,8 @@ static std::error_code consumeUInt32(Str<br class="">   return std::error_code();<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void COFFDumper::initializeFileAndStringTables(StringRef Data) {<br class="">   while (!Data.empty() && (CVFileChecksumTable.data() == nullptr ||<br class="">                            CVStringTable.data() == nullptr)) {<br class="">@@ -1182,7 +1195,9 @@ void COFFDumper::printCodeViewSymbolSect<br class="">   }<br class=""> }<br class=""><br class="">-static std::error_code decodeNumerictLeaf(StringRef &Data, APSInt &Num) {<br class="">+namespace {<br class="">+<br class="">+std::error_code decodeNumerictLeaf(StringRef &Data, APSInt &Num) {<br class="">   // Used to avoid overload ambiguity on APInt construtor.<br class="">   bool FalseVal = false;<br class="">   if (Data.size() < 2)<br class="">@@ -1248,6 +1263,8 @@ static std::error_code decodeNumerictLea<br class="">   return object_error::parse_failed;<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> /// Decode an unsigned integer numeric leaf value.<br class=""> std::error_code decodeUIntLeaf(StringRef &Data, uint64_t &Num) {<br class="">   APSInt N;<br class="">@@ -1313,11 +1330,10 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       break;<br class="">     }<br class=""><br class="">-    case S_PROC_ID_END: {<br class="">+    case S_PROC_ID_END:<br class="">       W.startLine() << "ProcEnd\n";<br class="">       InFunctionScope = false;<br class="">       break;<br class="">-    }<br class=""><br class="">     case S_BLOCK32: {<br class="">       DictScope S(W, "BlockStart");<br class="">@@ -1337,11 +1353,10 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       break;<br class="">     }<br class=""><br class="">-    case S_END: {<br class="">+    case S_END:<br class="">       W.startLine() << "BlockEnd\n";<br class="">       InFunctionScope = false;<br class="">       break;<br class="">-    }<br class=""><br class="">     case S_LABEL32: {<br class="">       DictScope S(W, "Label");<br class="">@@ -1515,6 +1530,7 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       printLocalVariableAddrGap(SymData);<br class="">       break;<br class="">     }<br class="">+<br class="">     case S_DEFRANGE_SUBFIELD: {<br class="">       DictScope S(W, "DefRangeSubfield");<br class="">       const DefRangeSubfieldSym *DefRangeSubfield;<br class="">@@ -1529,6 +1545,7 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       printLocalVariableAddrGap(SymData);<br class="">       break;<br class="">     }<br class="">+<br class="">     case S_DEFRANGE_REGISTER: {<br class="">       DictScope S(W, "DefRangeRegister");<br class="">       const DefRangeRegisterSym *DefRangeRegister;<br class="">@@ -1540,6 +1557,7 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       printLocalVariableAddrGap(SymData);<br class="">       break;<br class="">     }<br class="">+<br class="">     case S_DEFRANGE_SUBFIELD_REGISTER: {<br class="">       DictScope S(W, "DefRangeSubfieldRegister");<br class="">       const DefRangeSubfieldRegisterSym *DefRangeSubfieldRegisterSym;<br class="">@@ -1554,6 +1572,7 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       printLocalVariableAddrGap(SymData);<br class="">       break;<br class="">     }<br class="">+<br class="">     case S_DEFRANGE_FRAMEPOINTER_REL: {<br class="">       DictScope S(W, "DefRangeFramePointerRel");<br class="">       const DefRangeFramePointerRelSym *DefRangeFramePointerRel;<br class="">@@ -1564,6 +1583,7 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       printLocalVariableAddrGap(SymData);<br class="">       break;<br class="">     }<br class="">+<br class="">     case S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE: {<br class="">       DictScope S(W, "DefRangeFramePointerRelFullScope");<br class="">       const DefRangeFramePointerRelFullScopeSym<br class="">@@ -1572,6 +1592,7 @@ void COFFDumper::printCodeViewSymbolsSub<br class="">       W.printNumber("Offset", DefRangeFramePointerRelFullScope->Offset);<br class="">       break;<br class="">     }<br class="">+<br class="">     case S_DEFRANGE_REGISTER_REL: {<br class="">       DictScope S(W, "DefRangeRegisterRel");<br class="">       const DefRangeRegisterRelSym *DefRangeRegisterRel;<br class="">@@ -1945,7 +1966,9 @@ void COFFDumper::printFileNameForOffset(<br class="">   W.printHex(Label, getFileNameForFileOffset(FileOffset), FileOffset);<br class=""> }<br class=""><br class="">-static StringRef getLeafTypeName(TypeLeafKind LT) {<br class="">+namespace {<br class="">+<br class="">+StringRef getLeafTypeName(TypeLeafKind LT) {<br class="">   switch (LT) {<br class="">   case LF_STRING_ID: return "StringId";<br class="">   case LF_FIELDLIST: return "FieldList";<br class="">@@ -1974,6 +1997,8 @@ static StringRef getLeafTypeName(TypeLea<br class="">   return "UnknownLeaf";<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void COFFDumper::printCodeViewTypeSection(StringRef SectionName,<br class="">                                           const SectionRef &Section) {<br class="">   ListScope D(W, "CodeViewTypes");<br class="">@@ -2200,7 +2225,7 @@ void COFFDumper::printCodeViewTypeSectio<br class="">       break;<br class="">     }<br class=""><br class="">-    case LF_METHODLIST: {<br class="">+    case LF_METHODLIST:<br class="">       while (!LeafData.empty()) {<br class="">         const MethodListEntry *Method;<br class="">         error(consumeObject(LeafData, Method));<br class="">@@ -2214,7 +2239,6 @@ void COFFDumper::printCodeViewTypeSectio<br class="">         }<br class="">       }<br class="">       break;<br class="">-    }<br class=""><br class="">     case LF_FUNC_ID: {<br class="">       const FuncId *Func;<br class="">@@ -2356,7 +2380,9 @@ void COFFDumper::printCodeViewTypeSectio<br class="">   }<br class=""> }<br class=""><br class="">-static StringRef skipPadding(StringRef Data) {<br class="">+namespace {<br class="">+<br class="">+StringRef skipPadding(StringRef Data) {<br class="">   if (Data.empty())<br class="">     return Data;<br class="">   uint8_t Leaf = Data.front();<br class="">@@ -2367,6 +2393,8 @@ static StringRef skipPadding(StringRef D<br class="">   return Data.drop_front(Leaf & 0x0F);<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void COFFDumper::printMemberAttributes(MemberAttributes Attrs) {<br class="">   W.printEnum("AccessSpecifier", uint8_t(Attrs.getAccess()),<br class="">               makeArrayRef(MemberAccessNames));<br class="">@@ -2631,7 +2659,9 @@ void COFFDumper::printSymbols() {<br class=""><br class=""> void COFFDumper::printDynamicSymbols() { ListScope Group(W, "DynamicSymbols"); }<br class=""><br class="">-static ErrorOr<StringRef><br class="">+namespace {<br class="">+<br class="">+ErrorOr<StringRef><br class=""> getSectionName(const llvm::object::COFFObjectFile *Obj, int32_t SectionNumber,<br class="">                const coff_section *Section) {<br class="">   if (Section) {<br class="">@@ -2649,6 +2679,8 @@ getSectionName(const llvm::object::COFFO<br class="">   return StringRef("");<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void COFFDumper::printSymbol(const SymbolRef &Sym) {<br class="">   DictScope D(W, "Symbol");<br class=""><br class="">@@ -2893,7 +2925,9 @@ void COFFDumper::printCOFFDirectives() {<br class="">   }<br class=""> }<br class=""><br class="">-static StringRef getBaseRelocTypeName(uint8_t Type) {<br class="">+namespace {<br class="">+<br class="">+StringRef getBaseRelocTypeName(uint8_t Type) {<br class="">   switch (Type) {<br class="">   case COFF::IMAGE_REL_BASED_ABSOLUTE: return "ABSOLUTE";<br class="">   case COFF::IMAGE_REL_BASED_HIGH: return "HIGH";<br class="">@@ -2906,6 +2940,8 @@ static StringRef getBaseRelocTypeName(ui<br class="">   }<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> void COFFDumper::printCOFFBaseReloc() {<br class="">   ListScope D(W, "BaseReloc");<br class="">   for (const BaseRelocRef &I : Obj->base_relocs()) {<br class=""><br class="">Modified: llvm/trunk/tools/sancov/<a href="http://sancov.cc" class="">sancov.cc</a><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/sancov/sancov.cc?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/sancov/sancov.cc?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/tools/sancov/<a href="http://sancov.cc" class="">sancov.cc</a> (original)<br class="">+++ llvm/trunk/tools/sancov/<a href="http://sancov.cc" class="">sancov.cc</a> Tue Apr  5 15:19:49 2016<br class="">@@ -1,4 +1,4 @@<br class="">-//===-- <a href="http://sancov.cc" class="">sancov.cc</a> --------------------------------------------===//<br class="">+//===-- <a href="http://sancov.cc" class="">sancov.cc</a> ---------------------------------------------------------===//<br class=""> //<br class=""> //                     The LLVM Compiler Infrastructure<br class=""> //<br class="">@@ -10,7 +10,13 @@<br class=""> // This file is a command-line tool for reading and analyzing sanitizer<br class=""> // coverage.<br class=""> //===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "llvm/ADT/ArrayRef.h"<br class=""> #include "llvm/ADT/STLExtras.h"<br class="">+#include "llvm/ADT/SmallString.h"<br class="">+#include "llvm/ADT/SmallVector.h"<br class="">+#include "llvm/ADT/StringRef.h"<br class="">+#include "llvm/ADT/Triple.h"<br class=""> #include "llvm/ADT/Twine.h"<br class=""> #include "llvm/DebugInfo/Symbolize/Symbolize.h"<br class=""> #include "llvm/MC/MCAsmInfo.h"<br class="">@@ -47,9 +53,13 @@<br class=""> #include "llvm/Support/raw_ostream.h"<br class=""><br class=""> #include <algorithm><br class="">+#include <cstdint><br class="">+#include <cstdlib><br class="">+#include <map><br class="">+#include <memory><br class=""> #include <set><br class="">-#include <stdio.h><br class=""> #include <string><br class="">+#include <tuple><br class=""> #include <utility><br class=""> #include <vector><br class=""><br class="">@@ -83,28 +93,28 @@ cl::opt<ActionType> Action(<br class="">                           "Print coverage statistics."),<br class="">                clEnumValEnd));<br class=""><br class="">-static cl::list<std::string><br class="">+cl::list<std::string><br class="">     ClInputFiles(cl::Positional, cl::OneOrMore,<br class="">                  cl::desc("(<binary file>|<.sancov file>)..."));<br class=""><br class="">-static cl::opt<bool> ClDemangle("demangle", cl::init(true),<br class="">-                                cl::desc("Print demangled function name."));<br class="">+cl::opt<bool> ClDemangle("demangle", cl::init(true),<br class="">+                         cl::desc("Print demangled function name."));<br class=""><br class="">-static cl::opt<std::string> ClStripPathPrefix(<br class="">+cl::opt<std::string> ClStripPathPrefix(<br class="">     "strip_path_prefix", cl::init(""),<br class="">     cl::desc("Strip this prefix from file paths in reports."));<br class=""><br class="">-static cl::opt<std::string><br class="">+cl::opt<std::string><br class="">     ClBlacklist("blacklist", cl::init(""),<br class="">                 cl::desc("Blacklist file (sanitizer blacklist format)."));<br class=""><br class="">-static cl::opt<bool> ClUseDefaultBlacklist(<br class="">+cl::opt<bool> ClUseDefaultBlacklist(<br class="">     "use_default_blacklist", cl::init(true), cl::Hidden,<br class="">     cl::desc("Controls if default blacklist should be used."));<br class=""><br class="">-static const char *const DefaultBlacklistStr = "fun:__sanitizer_.*\n"<br class="">-                                               "src:/usr/include/.*\n"<br class="">-                                               "src:.*/libc\\+\\+/.*\n";<br class="">+const char *const DefaultBlacklistStr = "fun:__sanitizer_.*\n"<br class="">+                                        "src:/usr/include/.*\n"<br class="">+                                        "src:.*/libc\\+\\+/.*\n";<br class=""><br class=""> // --------- FORMAT SPECIFICATION ---------<br class=""><br class="">@@ -113,37 +123,37 @@ struct FileHeader {<br class="">   uint32_t Magic;<br class=""> };<br class=""><br class="">-static const uint32_t BinCoverageMagic = 0xC0BFFFFF;<br class="">-static const uint32_t Bitness32 = 0xFFFFFF32;<br class="">-static const uint32_t Bitness64 = 0xFFFFFF64;<br class="">+const uint32_t BinCoverageMagic = 0xC0BFFFFF;<br class="">+const uint32_t Bitness32 = 0xFFFFFF32;<br class="">+const uint32_t Bitness64 = 0xFFFFFF64;<br class=""><br class=""> // --------- ERROR HANDLING ---------<br class=""><br class="">-static void Fail(const llvm::Twine &E) {<br class="">+void Fail(const llvm::Twine &E) {<br class="">   errs() << "Error: " << E << "\n";<br class="">   exit(1);<br class=""> }<br class=""><br class="">-static void FailIfError(std::error_code Error) {<br class="">+void FailIfError(std::error_code Error) {<br class="">   if (!Error)<br class="">     return;<br class="">   errs() << "Error: " << Error.message() << "(" << Error.value() << ")\n";<br class="">   exit(1);<br class=""> }<br class=""><br class="">-template <typename T> static void FailIfError(const ErrorOr<T> &E) {<br class="">+template <typename T><br class="">+void FailIfError(const ErrorOr<T> &E) {<br class="">   FailIfError(E.getError());<br class=""> }<br class=""><br class="">-static void FailIfNotEmpty(const llvm::Twine &E) {<br class="">+void FailIfNotEmpty(const llvm::Twine &E) {<br class="">   if (E.str().empty())<br class="">     return;<br class="">   Fail(E);<br class=""> }<br class=""><br class=""> template <typename T><br class="">-static void FailIfEmpty(const std::unique_ptr<T> &Ptr,<br class="">-                        const std::string &Message) {<br class="">+void FailIfEmpty(const std::unique_ptr<T> &Ptr, const std::string &Message) {<br class="">   if (Ptr.get())<br class="">     return;<br class="">   Fail(Message);<br class="">@@ -154,7 +164,7 @@ static void FailIfEmpty(const std::uniqu<br class=""> // Produces std::map<K, std::vector<E>> grouping input<br class=""> // elements by FuncTy result.<br class=""> template <class RangeTy, class FuncTy><br class="">-static inline auto group_by(const RangeTy &R, FuncTy F)<br class="">+inline auto group_by(const RangeTy &R, FuncTy F)<br class="">     -> std::map<typename std::decay<decltype(F(*R.begin()))>::type,<br class="">                 std::vector<typename std::decay<decltype(*R.begin())>::type>> {<br class="">   std::map<typename std::decay<decltype(F(*R.begin()))>::type,<br class="">@@ -167,8 +177,7 @@ static inline auto group_by(const RangeT<br class=""> }<br class=""><br class=""> template <typename T><br class="">-static void readInts(const char *Start, const char *End,<br class="">-                     std::set<uint64_t> *Ints) {<br class="">+void readInts(const char *Start, const char *End, std::set<uint64_t> *Ints) {<br class="">   const T *S = reinterpret_cast<const T *>(Start);<br class="">   const T *E = reinterpret_cast<const T *>(End);<br class="">   std::copy(S, E, std::inserter(*Ints, Ints->end()));<br class="">@@ -211,7 +220,7 @@ std::string stripPathPrefix(std::string<br class="">   return Path.substr(Pos + ClStripPathPrefix.size());<br class=""> }<br class=""><br class="">-static std::unique_ptr<symbolize::LLVMSymbolizer> createSymbolizer() {<br class="">+std::unique_ptr<symbolize::LLVMSymbolizer> createSymbolizer() {<br class="">   symbolize::LLVMSymbolizer::Options SymbolizerOptions;<br class="">   SymbolizerOptions.Demangle = ClDemangle;<br class="">   SymbolizerOptions.UseSymbolTable = true;<br class="">@@ -276,9 +285,9 @@ private:<br class=""> };<br class=""><br class=""> // Collect all debug info for given addresses.<br class="">-static std::vector<AddrInfo> getAddrInfo(std::string ObjectFile,<br class="">-                                         const std::set<uint64_t> &Addrs,<br class="">-                                         bool InlinedCode) {<br class="">+std::vector<AddrInfo> getAddrInfo(std::string ObjectFile,<br class="">+                                  const std::set<uint64_t> &Addrs,<br class="">+                                  bool InlinedCode) {<br class="">   std::vector<AddrInfo> Result;<br class="">   auto Symbolizer(createSymbolizer());<br class="">   Blacklists B;<br class="">@@ -306,7 +315,7 @@ static std::vector<AddrInfo> getAddrInfo<br class=""><br class=""> // Locate __sanitizer_cov* function addresses that are used for coverage<br class=""> // reporting.<br class="">-static std::set<uint64_t><br class="">+std::set<uint64_t><br class=""> findSanitizerCovFunctions(const object::ObjectFile &O) {<br class="">   std::set<uint64_t> Result;<br class=""><br class="">@@ -331,8 +340,8 @@ findSanitizerCovFunctions(const object::<br class=""> // Locate addresses of all coverage points in a file. Coverage point<br class=""> // is defined as the 'address of instruction following __sanitizer_cov<br class=""> // call - 1'.<br class="">-static void getObjectCoveragePoints(const object::ObjectFile &O,<br class="">-                                    std::set<uint64_t> *Addrs) {<br class="">+void getObjectCoveragePoints(const object::ObjectFile &O,<br class="">+                             std::set<uint64_t> *Addrs) {<br class="">   Triple TheTriple("unknown-unknown-unknown");<br class="">   TheTriple.setArch(Triple::ArchType(O.getArch()));<br class="">   auto TripleName = TheTriple.getTriple();<br class="">@@ -404,7 +413,7 @@ static void getObjectCoveragePoints(cons<br class="">   }<br class=""> }<br class=""><br class="">-static void<br class="">+void<br class=""> visitObjectFiles(const object::Archive &A,<br class="">                  std::function<void(const object::ObjectFile &)> Fn) {<br class="">   for (auto &ErrorOrChild : A.children()) {<br class="">@@ -419,7 +428,7 @@ visitObjectFiles(const object::Archive &<br class="">   }<br class=""> }<br class=""><br class="">-static void<br class="">+void<br class=""> visitObjectFiles(std::string FileName,<br class="">                  std::function<void(const object::ObjectFile &)> Fn) {<br class="">   ErrorOr<object::OwningBinary<object::Binary>> BinaryOrErr =<br class="">@@ -455,7 +464,7 @@ std::set<uint64_t> getCoveragePoints(std<br class="">   return Result;<br class=""> }<br class=""><br class="">-static void printCovPoints(std::string ObjFile, raw_ostream &OS) {<br class="">+void printCovPoints(std::string ObjFile, raw_ostream &OS) {<br class="">   for (uint64_t Addr : getCoveragePoints(ObjFile)) {<br class="">     OS << "0x";<br class="">     OS.write_hex(Addr);<br class="">@@ -463,7 +472,7 @@ static void printCovPoints(std::string O<br class="">   }<br class=""> }<br class=""><br class="">-static std::string escapeHtml(const std::string &S) {<br class="">+std::string escapeHtml(const std::string &S) {<br class="">   std::string Result;<br class="">   Result.reserve(S.size());<br class="">   for (char Ch : S) {<br class="">@@ -493,7 +502,7 @@ static std::string escapeHtml(const std:<br class=""><br class=""> // Adds leading zeroes wrapped in 'lz' style.<br class=""> // Leading zeroes help locate 000% coverage.<br class="">-static std::string formatHtmlPct(size_t Pct) {<br class="">+std::string formatHtmlPct(size_t Pct) {<br class="">   Pct = std::max(std::size_t{0}, std::min(std::size_t{100}, Pct));<br class=""><br class="">   std::string Num = std::to_string(Pct);<br class="">@@ -504,7 +513,7 @@ static std::string formatHtmlPct(size_t<br class="">   return Zeroes + Num;<br class=""> }<br class=""><br class="">-static std::string anchorName(std::string Anchor) {<br class="">+std::string anchorName(std::string Anchor) {<br class="">   llvm::MD5 Hasher;<br class="">   llvm::MD5::MD5Result Hash;<br class="">   Hasher.update(Anchor);<br class="">@@ -515,7 +524,7 @@ static std::string anchorName(std::strin<br class="">   return HexString.str().str();<br class=""> }<br class=""><br class="">-static ErrorOr<bool> isCoverageFile(std::string FileName) {<br class="">+ErrorOr<bool> isCoverageFile(std::string FileName) {<br class="">   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =<br class="">       MemoryBuffer::getFile(FileName);<br class="">   if (!BufOrErr) {<br class="">@@ -542,7 +551,7 @@ struct CoverageStats {<br class="">   size_t CovFns;<br class=""> };<br class=""><br class="">-static raw_ostream &operator<<(raw_ostream &OS, const CoverageStats &Stats) {<br class="">+raw_ostream &operator<<(raw_ostream &OS, const CoverageStats &Stats) {<br class="">   OS << "all-edges: " << Stats.AllPoints << "\n";<br class="">   OS << "cov-edges: " << Stats.CovPoints << "\n";<br class="">   OS << "all-functions: " << Stats.AllFns << "\n";<br class="">@@ -822,8 +831,8 @@ private:<br class="">   std::vector<AddrInfo> CovAddrInfo;<br class=""> };<br class=""><br class="">-static void printFunctionLocs(const SourceCoverageData::FunctionLocs &FnLocs,<br class="">-                              raw_ostream &OS) {<br class="">+void printFunctionLocs(const SourceCoverageData::FunctionLocs &FnLocs,<br class="">+                       raw_ostream &OS) {<br class="">   for (const auto &Fns : FnLocs) {<br class="">     for (const auto &Fn : Fns.second) {<br class="">       OS << stripPathPrefix(Fns.first.FileName) << ":" << Fns.first.Line << " "<br class="">@@ -1182,7 +1191,7 @@ private:<br class="">   const std::set<std::string> CoverageFiles;<br class=""> };<br class=""><br class="">-} // namespace<br class="">+} // end anonymous namespace<br class=""><br class=""> int main(int argc, char **argv) {<br class="">   // Print stack trace if we signal out.<br class=""><br class="">Modified: llvm/trunk/tools/sanstats/sanstats.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/sanstats/sanstats.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/sanstats/sanstats.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/tools/sanstats/sanstats.cpp (original)<br class="">+++ llvm/trunk/tools/sanstats/sanstats.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -12,20 +12,26 @@<br class=""> //<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class="">+#include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/DebugInfo/Symbolize/Symbolize.h"<br class=""> #include "llvm/Support/CommandLine.h"<br class=""> #include "llvm/Support/ErrorOr.h"<br class=""> #include "llvm/Support/MemoryBuffer.h"<br class=""> #include "llvm/Transforms/Utils/SanitizerStats.h"<br class="">-#include <stdint.h><br class="">+#include <cassert><br class="">+#include <cstdint><br class="">+#include <memory><br class="">+#include <string><br class=""><br class=""> using namespace llvm;<br class=""><br class="">-static cl::opt<std::string> ClInputFile(cl::Positional, cl::Required,<br class="">-                                        cl::desc("<filename>"));<br class="">+namespace {<br class=""><br class="">-static cl::opt<bool> ClDemangle("demangle", cl::init(false),<br class="">-                                cl::desc("Print demangled function name."));<br class="">+cl::opt<std::string> ClInputFile(cl::Positional, cl::Required,<br class="">+                                 cl::desc("<filename>"));<br class="">+<br class="">+cl::opt<bool> ClDemangle("demangle", cl::init(false),<br class="">+                         cl::desc("Print demangled function name."));<br class=""><br class=""> inline uint64_t KindFromData(uint64_t Data, char SizeofPtr) {<br class="">   return Data >> (SizeofPtr * 8 - kSanitizerStatKindBits);<br class="">@@ -63,7 +69,7 @@ const char *ReadModule(char SizeofPtr, c<br class="">   SymbolizerOptions.UseSymbolTable = true;<br class="">   symbolize::LLVMSymbolizer Symbolizer(SymbolizerOptions);<br class=""><br class="">-  while (1) {<br class="">+  while (true) {<br class="">     uint64_t Addr = ReadLE(SizeofPtr, Begin, End);<br class="">     Begin += SizeofPtr;<br class="">     uint64_t Data = ReadLE(SizeofPtr, Begin, End);<br class="">@@ -109,6 +115,8 @@ const char *ReadModule(char SizeofPtr, c<br class="">   }<br class=""> }<br class=""><br class="">+} // end anonymous namespace<br class="">+<br class=""> int main(int argc, char **argv) {<br class="">   cl::ParseCommandLineOptions(argc, argv,<br class="">                               "Sanitizer Statistics Processing Tool");<br class=""><br class="">Modified: llvm/trunk/unittests/ADT/SCCIteratorTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SCCIteratorTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SCCIteratorTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/ADT/SCCIteratorTest.cpp (original)<br class="">+++ llvm/trunk/unittests/ADT/SCCIteratorTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -10,7 +10,10 @@<br class=""> #include "llvm/ADT/SCCIterator.h"<br class=""> #include "llvm/ADT/GraphTraits.h"<br class=""> #include "gtest/gtest.h"<br class="">-#include <limits.h><br class="">+#include <cassert><br class="">+#include <climits><br class="">+#include <utility><br class="">+#include <vector><br class=""><br class=""> using namespace llvm;<br class=""><br class="">@@ -27,13 +30,14 @@ private:<br class="">   static void ValidateIndex(unsigned Idx) {<br class="">     assert(Idx < N && "Invalid node index!");<br class="">   }<br class="">-public:<br class=""><br class="">+public:<br class="">   /// NodeSubset - A subset of the graph's nodes.<br class="">   class NodeSubset {<br class="">     typedef unsigned char BitVector; // Where the limitation N <= 8 comes from.<br class="">     BitVector Elements;<br class="">     NodeSubset(BitVector e) : Elements(e) {}<br class="">+<br class="">   public:<br class="">     /// NodeSubset - Default constructor, creates an empty subset.<br class="">     NodeSubset() : Elements(0) {<br class="">@@ -98,8 +102,8 @@ public:<br class=""> private:<br class="">   /// Nodes - The list of nodes for this graph.<br class="">   NodeType Nodes[N];<br class="">-public:<br class=""><br class="">+public:<br class="">   /// Graph - Default constructor.  Creates an empty graph.<br class="">   Graph() {<br class="">     // Let each node know which node it is.  This allows us to find the start of<br class="">@@ -166,6 +170,7 @@ public:<br class="">     NodeSubset Children;<br class=""><br class="">     ChildIterator(); // Disable default constructor.<br class="">+<br class="">   protected:<br class="">     ChildIterator(NodeType *F, NodeSubset C) : FirstNode(F), Children(C) {}<br class=""><br class="">@@ -341,4 +346,4 @@ TEST(SCCIteratorTest, AllSmallGraphs) {<br class="">   }<br class=""> }<br class=""><br class="">-}<br class="">+} // end namespace llvm<br class=""><br class="">Modified: llvm/trunk/unittests/ADT/SmallStringTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallStringTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallStringTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/ADT/SmallStringTest.cpp (original)<br class="">+++ llvm/trunk/unittests/ADT/SmallStringTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -12,10 +12,9 @@<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class=""> #include "llvm/ADT/SmallString.h"<br class="">+#include "llvm/ADT/SmallVector.h"<br class="">+#include "llvm/ADT/StringRef.h"<br class=""> #include "gtest/gtest.h"<br class="">-#include <climits><br class="">-#include <cstring><br class="">-#include <stdarg.h><br class=""><br class=""> using namespace llvm;<br class=""><br class="">@@ -204,4 +203,4 @@ TEST(StringRefTest, Comparisons) {<br class="">   EXPECT_EQ( 1, SmallString<10>("V8_q0").compare_numeric("V1_q0"));<br class=""> }<br class=""><br class="">-}<br class="">+} // end anonymous namespace<br class=""><br class="">Modified: llvm/trunk/unittests/ADT/SmallVectorTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallVectorTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallVectorTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/ADT/SmallVectorTest.cpp (original)<br class="">+++ llvm/trunk/unittests/ADT/SmallVectorTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -15,8 +15,10 @@<br class=""> #include "llvm/ADT/SmallVector.h"<br class=""> #include "llvm/Support/Compiler.h"<br class=""> #include "gtest/gtest.h"<br class="">+#include <cstdarg><br class="">+#include <cstdlib><br class=""> #include <list><br class="">-#include <stdarg.h><br class="">+#include <utility><br class=""><br class=""> using namespace llvm;<br class=""><br class="">@@ -141,9 +143,10 @@ int Constructable::numCopyAssignmentCall<br class=""> int Constructable::numMoveAssignmentCalls;<br class=""><br class=""> struct NonCopyable {<br class="">-  NonCopyable() {}<br class="">-  NonCopyable(NonCopyable &&) {}<br class="">+  NonCopyable() = default;<br class="">+  NonCopyable(NonCopyable &&) = default;<br class="">   NonCopyable &operator=(NonCopyable &&) { return *this; }<br class="">+<br class=""> private:<br class="">   NonCopyable(const NonCopyable &) = delete;<br class="">   NonCopyable &operator=(const NonCopyable &) = delete;<br class="">@@ -200,7 +203,6 @@ protected:<br class="">   VectorT otherVector;<br class=""> };<br class=""><br class="">-<br class=""> typedef ::testing::Types<SmallVector<Constructable, 0>,<br class="">                          SmallVector<Constructable, 1>,<br class="">                          SmallVector<Constructable, 2>,<br class="">@@ -522,7 +524,6 @@ TYPED_TEST(SmallVectorTest, InsertRepeat<br class="">   this->assertValuesInOrder(this->theVector, 6u, 1, 16, 16, 2, 3, 4);<br class=""> }<br class=""><br class="">-<br class=""> TYPED_TEST(SmallVectorTest, InsertRepeatedAtEndTest) {<br class="">   SCOPED_TRACE("InsertRepeatedTest");<br class=""><br class="">@@ -581,7 +582,6 @@ TYPED_TEST(SmallVectorTest, InsertRangeT<br class="">   this->assertValuesInOrder(this->theVector, 6u, 1, 77, 77, 77, 2, 3);<br class=""> }<br class=""><br class="">-<br class=""> TYPED_TEST(SmallVectorTest, InsertRangeAtEndTest) {<br class="">   SCOPED_TRACE("InsertRangeTest");<br class=""><br class="">@@ -748,11 +748,14 @@ TEST(SmallVectorCustomTest, NoAssignTest<br class=""><br class=""> struct MovedFrom {<br class="">   bool hasValue;<br class="">+<br class="">   MovedFrom() : hasValue(true) {<br class="">   }<br class="">+<br class="">   MovedFrom(MovedFrom&& m) : hasValue(m.hasValue) {<br class="">     m.hasValue = false;<br class="">   }<br class="">+<br class="">   MovedFrom &operator=(MovedFrom&& m) {<br class="">     hasValue = m.hasValue;<br class="">     m.hasValue = false;<br class="">@@ -775,6 +778,7 @@ enum EmplaceableArgState {<br class="">   EAS_RValue,<br class="">   EAS_Failure<br class=""> };<br class="">+<br class=""> template <int I> struct EmplaceableArg {<br class="">   EmplaceableArgState State;<br class="">   EmplaceableArg() : State(EAS_Defaulted) {}<br class="">@@ -924,4 +928,4 @@ TEST(SmallVectorTest, InitializerList) {<br class="">   EXPECT_TRUE(makeArrayRef(V2).equals({4, 5, 3, 2}));<br class=""> }<br class=""><br class="">-} // end namespace<br class="">+} // end anonymous namespace<br class=""><br class="">Modified: llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp (original)<br class="">+++ llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -13,10 +13,10 @@<br class=""> #include "llvm-c/OrcBindings.h"<br class=""> #include "llvm-c/Target.h"<br class=""> #include "llvm-c/TargetMachine.h"<br class="">+#include "llvm/ADT/Triple.h"<br class=""><br class="">-#include <stdio.h><br class="">-#include <stdlib.h><br class="">-#include <string.h><br class="">+#include <cstring><br class="">+#include <memory><br class=""><br class=""> namespace llvm {<br class=""><br class="">@@ -157,4 +157,4 @@ TEST_F(OrcCAPIExecutionTest, TestDirectC<br class="">   LLVMOrcDisposeInstance(JIT);<br class=""> }<br class=""><br class="">-} // namespace llvm<br class="">+} // end namespace llvm<br class=""><br class="">Modified: llvm/trunk/unittests/Support/CommandLineTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CommandLineTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/CommandLineTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/Support/CommandLineTest.cpp (original)<br class="">+++ llvm/trunk/unittests/Support/CommandLineTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -7,12 +7,17 @@<br class=""> //<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class="">+#include "llvm/ADT/ArrayRef.h"<br class=""> #include "llvm/ADT/STLExtras.h"<br class="">+#include "llvm/ADT/SmallVector.h"<br class="">+#include "llvm/ADT/StringMap.h"<br class="">+#include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/Config/config.h"<br class="">+#include "llvm/Support/Allocator.h"<br class=""> #include "llvm/Support/CommandLine.h"<br class=""> #include "llvm/Support/StringSaver.h"<br class=""> #include "gtest/gtest.h"<br class="">-#include <stdlib.h><br class="">+#include <cstdlib><br class=""> #include <string><br class=""><br class=""> using namespace llvm;<br class="">@@ -20,7 +25,7 @@ using namespace llvm;<br class=""> namespace {<br class=""><br class=""> class TempEnvVar {<br class="">- public:<br class="">+public:<br class="">   TempEnvVar(const char *name, const char *value)<br class="">       : name(name) {<br class="">     const char *old_value = getenv(name);<br class="">@@ -41,13 +46,14 @@ class TempEnvVar {<br class=""> #endif<br class="">   }<br class=""><br class="">- private:<br class="">+private:<br class="">   const char *const name;<br class=""> };<br class=""><br class=""> template <typename T><br class=""> class StackOption : public cl::opt<T> {<br class="">   typedef cl::opt<T> Base;<br class="">+<br class=""> public:<br class="">   // One option...<br class="">   template<class M0t><br class="">@@ -69,7 +75,6 @@ public:<br class="">   ~StackOption() override { this->removeArgument(); }<br class=""> };<br class=""><br class="">-<br class=""> cl::OptionCategory TestCategory("Test Options", "Description");<br class=""> TEST(CommandLineTest, ModifyExisitingOption) {<br class="">   StackOption<int> TestOption("test-option", cl::desc("old description"));<br class="">@@ -265,4 +270,4 @@ TEST(CommandLineTest, HideUnrelatedOptio<br class="">       << "Hid default option that should be visable.";<br class=""> }<br class=""><br class="">-}  // anonymous namespace<br class="">+} // end anonymous namespace<br class=""><br class="">Modified: llvm/trunk/unittests/Support/ProgramTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ProgramTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ProgramTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/Support/ProgramTest.cpp (original)<br class="">+++ llvm/trunk/unittests/Support/ProgramTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -7,13 +7,19 @@<br class=""> //<br class=""> //===----------------------------------------------------------------------===//<br class=""><br class="">+#include "llvm/ADT/SmallString.h"<br class="">+#include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/Support/ConvertUTF.h"<br class=""> #include "llvm/Support/CommandLine.h"<br class=""> #include "llvm/Support/FileSystem.h"<br class=""> #include "llvm/Support/Path.h"<br class=""> #include "llvm/Support/Program.h"<br class="">+#include "llvm/Support/raw_ostream.h"<br class=""> #include "gtest/gtest.h"<br class="">-#include <stdlib.h><br class="">+#include <cstdlib><br class="">+#include <cstring><br class="">+#include <string><br class="">+#include <vector><br class=""> #if defined(__APPLE__)<br class=""> # include <crt_externs.h><br class=""> #elif !defined(_MSC_VER)<br class="">@@ -45,6 +51,7 @@ void sleep_for(unsigned int seconds) {<br class="">     GTEST_FATAL_FAILURE_(MessageStorage.c_str());                              \<br class="">   } else {                                                                     \<br class="">   }<br class="">+<br class=""> // From TestMain.cpp.<br class=""> extern const char *TestMainArgv0;<br class=""><br class="">@@ -53,9 +60,9 @@ namespace {<br class=""> using namespace llvm;<br class=""> using namespace sys;<br class=""><br class="">-static cl::opt<std::string><br class="">+cl::opt<std::string><br class=""> ProgramTestStringArg1("program-test-string-arg1");<br class="">-static cl::opt<std::string><br class="">+cl::opt<std::string><br class=""> ProgramTestStringArg2("program-test-string-arg2");<br class=""><br class=""> class ProgramEnvTest : public testing::Test {<br class="">@@ -309,7 +316,6 @@ TEST(ProgramTest, TestExecuteNegative) {<br class="">     ASSERT_TRUE(ExecutionFailed);<br class="">     ASSERT_FALSE(Error.empty());<br class="">   }<br class="">-<br class=""> }<br class=""><br class=""> #ifdef LLVM_ON_WIN32<br class=""><br class="">Modified: llvm/trunk/unittests/Support/StreamingMemoryObjectTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/StreamingMemoryObjectTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/StreamingMemoryObjectTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/Support/StreamingMemoryObjectTest.cpp (original)<br class="">+++ llvm/trunk/unittests/Support/StreamingMemoryObjectTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -11,7 +11,7 @@<br class=""> #include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/Support/StreamingMemoryObject.h"<br class=""> #include "gtest/gtest.h"<br class="">-#include <string.h><br class="">+#include <cstring><br class=""><br class=""> using namespace llvm;<br class=""><br class="">@@ -65,4 +65,4 @@ TEST(StreamingMemoryObjectTest, getPoint<br class="">   EXPECT_TRUE(std::equal(InputBuffer, InputBuffer + 8, O.getPointer(0, 20)));<br class=""> }<br class=""><br class="">-} // end namespace<br class="">+} // end anonymous namespace<br class=""><br class="">Modified: llvm/trunk/unittests/Support/TimeValueTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimeValueTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimeValueTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/Support/TimeValueTest.cpp (original)<br class="">+++ llvm/trunk/unittests/Support/TimeValueTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -9,9 +9,12 @@<br class=""><br class=""> #include "gtest/gtest.h"<br class=""> #include "llvm/Support/TimeValue.h"<br class="">-#include <time.h><br class="">+#include <cstdint><br class="">+#include <cstdlib><br class="">+#include <ctime><br class=""><br class=""> using namespace llvm;<br class="">+<br class=""> namespace {<br class=""><br class=""> TEST(TimeValue, time_t) {<br class="">@@ -37,4 +40,4 @@ TEST(TimeValue, Win32FILETIME) {<br class="">   EXPECT_EQ(ft1970, epoch.toWin32Time());<br class=""> }<br class=""><br class="">-}<br class="">+} // end anonymous namespace<br class=""><br class="">Modified: llvm/trunk/unittests/Support/TimerTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimerTest.cpp?rev=265454&r1=265453&r2=265454&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimerTest.cpp?rev=265454&r1=265453&r2=265454&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/unittests/Support/TimerTest.cpp (original)<br class="">+++ llvm/trunk/unittests/Support/TimerTest.cpp Tue Apr  5 15:19:49 2016<br class="">@@ -13,7 +13,7 @@<br class=""> #if LLVM_ON_WIN32<br class=""> #include <windows.h><br class=""> #else<br class="">-#include <time.h><br class="">+#include <ctime><br class=""> #endif<br class=""><br class=""> using namespace llvm;<br class="">@@ -62,4 +62,4 @@ TEST(Timer, CheckIfTriggered) {<br class="">   EXPECT_FALSE(T1.hasTriggered());<br class=""> }<br class=""><br class="">-} // end anon namespace<br class="">+} // end anonymous namespace<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<br class=""></div></div></blockquote></div><br class=""></div></body></html>