Fixes to improve logging (by printing basic
block labels) and produce cleaner IR (by removing the thread-safe statics guards) llvm-svn: 107528
This commit is contained in:
		
							parent
							
								
									03813ec687
								
							
						
					
					
						commit
						248e64b5b8
					
				| 
						 | 
					@ -236,6 +236,7 @@ ClangExpression::CreateCompilerInstance (bool &IsAST)
 | 
				
			||||||
    // Our hook into Clang's lookup mechanism only works in C++.
 | 
					    // Our hook into Clang's lookup mechanism only works in C++.
 | 
				
			||||||
    m_clang_ap->getLangOpts().CPlusPlus = true;
 | 
					    m_clang_ap->getLangOpts().CPlusPlus = true;
 | 
				
			||||||
    m_clang_ap->getLangOpts().ObjC1 = true;
 | 
					    m_clang_ap->getLangOpts().ObjC1 = true;
 | 
				
			||||||
 | 
					    m_clang_ap->getLangOpts().ThreadsafeStatics = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Disable some warnings.
 | 
					    // Disable some warnings.
 | 
				
			||||||
    m_clang_ap->getDiagnosticOpts().Warnings.push_back("no-unused-value");
 | 
					    m_clang_ap->getDiagnosticOpts().Warnings.push_back("no-unused-value");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
//===-- IRToDWARF.cpp ---------------------------------------*- C++ -*-===//
 | 
					//===-- IRToDWARF.cpp -------------------------------------------*- C++ -*-===//
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
//                     The LLVM Compiler Infrastructure
 | 
					//                     The LLVM Compiler Infrastructure
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
| 
						 | 
					@ -141,7 +141,8 @@ IRToDWARF::runOnBasicBlock(BasicBlock &BB, Relocator &R)
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if (log)
 | 
					    if (log)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        log->Printf("Translating a basic block:");
 | 
					        log->Printf("Translating basic block %s:",
 | 
				
			||||||
 | 
					                    BB.hasName() ? BB.getNameStr().c_str() : "[anonymous]");
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        llvm::BasicBlock::iterator ii;
 | 
					        llvm::BasicBlock::iterator ii;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue