Made lldb.cpp build with clang 5.0. 

Also removed the use of llvm::raw_string_ostream as it wasn't needed. 

Also fixed a crasher that could occur when the following line returned a C string tied to a local variable:

    return OS.str().c_str();

I am guessing "static std::string buf;" was supposed to get assigned to "OS.str()" and then have "buf.c_str()" returned. 

Modified the non-apple version code to cache its value and not recompute the version every time.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176274 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed an issue where the LDFLAGS were not correctly gettting modified to be additive.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176281 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the getCompilerVersion() function to do the right thing with clang 5.0 which now says "LLVM version" instead of "clang version".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176282 91177308-0d34-0410-b5e6-96231b3b80d8
Replace all "-gdwarf-2" with "-g" to use the compiler defaults.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176283 91177308-0d34-0410-b5e6-96231b3b80d8