@@ -248,17 +248,17 @@ private Collection<? extends String> arMembers(String path) throws IOException,
248
248
if (Files .probeContentType (Paths .get (f )).contains (LLVM_IR_BITCODE )) {
249
249
HashSet <String > definedHere = new HashSet <>();
250
250
ProcessBuilder nm = new ProcessBuilder ();
251
- nm .command (LLVM_NM , "-g" , "- -defined-only" , f );
251
+ nm .command (LLVM_NM , "--defined-only" , f );
252
252
nm .redirectInput (Redirect .INHERIT );
253
253
nm .redirectError (Redirect .INHERIT );
254
254
nm .redirectOutput (Redirect .PIPE );
255
255
Process nmProc = nm .start ();
256
256
try (BufferedReader buffer = new BufferedReader (new InputStreamReader (nmProc .getInputStream ()))) {
257
257
String line = null ;
258
258
while ((line = buffer .readLine ()) != null ) {
259
- String [] symboldef = line .split (" " );
259
+ String [] symboldef = line .split (" [Tt] " );
260
260
if (symboldef .length >= 2 ) {
261
- definedHere .add (symboldef [symboldef .length - 1 ]);
261
+ definedHere .add (symboldef [symboldef .length - 1 ]. trim () );
262
262
}
263
263
}
264
264
}
@@ -267,7 +267,7 @@ private Collection<? extends String> arMembers(String path) throws IOException,
267
267
ArrayList <String > extractCmd = new ArrayList <>();
268
268
extractCmd .add ("llvm-extract" );
269
269
for (String def : definedHere ) {
270
- if (undefinedSymbols .contains (def )) {
270
+ if (! definedSymbols .contains (def )) {
271
271
definedSymbols .add (def );
272
272
undefinedSymbols .remove (def );
273
273
extractCmd .add ("-func" );
0 commit comments