View Issue Details

IDProjectCategoryView StatusLast Update
0000098fileGeneralpublic2019-09-11 16:59
Reporterjohannes Assigned Tochristos  
Status feedbackResolutionopen 
Product Version5.37 
Summary0000098: LLVM Assembly Language files (*.ll) are reported as C source
DescriptionFiles containing the human-readable assembly language of the LLVM intermediate representation are mistakenly reported to be C source.
Perhaps we can add some simple patterns to distuingish them. The mime type could be "text/x-llvm" or "text/x-llvm-ir".
LLVM Language:
Steps To Reproduce$ cat > main.ll << EOF
define i8 @main() {
    ret i8 123

$ file main.ll
main.ll: C source, ASCII text
Additional InformationHere are some magic patterns I've been using which seem to work

cat >> magic/Magdir/llvm <<EOF
0 search/8192 define LLVM Assembly Language text
!:mime text/x-llvm
>0 regex \^define

0 search/8192 declare LLVM Assembly Language text
!:mime text/x-llvm
>0 regex \^declare
TagsNo tags attached.



2019-09-11 16:59

manager   ~0003294

We need something stronger than that, otherwise many text files will match.

Issue History

Date Modified Username Field Change
2019-08-11 08:47 johannes New Issue
2019-09-11 16:58 christos Assigned To => christos
2019-09-11 16:58 christos Status new => assigned
2019-09-11 16:59 christos Status assigned => feedback
2019-09-11 16:59 christos Note Added: 0003294